Commit f35c51ea authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

fixed bug issue total ro - bs!

See merge request !1441
parents 5cbaf397 b5f6ad27
...@@ -707,16 +707,17 @@ export default class BalanceSheetRO extends Component { ...@@ -707,16 +707,17 @@ export default class BalanceSheetRO extends Component {
return a return a
} }
const handleTotal = (val, tableMeta) => { const handleTotal = (tableMeta) => {
let total = 0 let total = 0
tableMeta.rowData.map((item,index) => { tableMeta.rowData.map((item,index) => {
if (index >= 7 && index <= 18) { if (index == 18) {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") { total = isNaN(item) ? Number(item.value) : Number(item)
total += Number(item.value) // if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
} else { // total = Number(item.value)
total += Number(item) // } else {
} // total = Number(item)
// }
} }
}) })
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
...@@ -2318,7 +2319,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2318,7 +2319,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleTotal(val, tableMeta)).toFixed(1)} value={Number(handleTotal(tableMeta)).toFixed(1)}
/> />
</span> </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