Commit b5f6ad27 authored by faisalhamdi's avatar faisalhamdi

fixed bug issue total ro - bs!

parent 5cbaf397
......@@ -707,16 +707,17 @@ export default class BalanceSheetRO extends Component {
return a
}
const handleTotal = (val, tableMeta) => {
const handleTotal = (tableMeta) => {
let total = 0
tableMeta.rowData.map((item,index) => {
if (index >= 7 && index <= 18) {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
total += Number(item.value)
} else {
total += Number(item)
}
if (index == 18) {
total = isNaN(item) ? Number(item.value) : Number(item)
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
// total = Number(item.value)
// } else {
// total = Number(item)
// }
}
})
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
......@@ -2318,7 +2319,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(val, tableMeta)).toFixed(1)}
value={Number(handleTotal(tableMeta)).toFixed(1)}
/>
</span>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment