Commit 213b78e4 authored by r.kurnia's avatar r.kurnia

issue handleTotalControl kalo status nya close

parent e34f39b4
...@@ -1269,11 +1269,18 @@ export default class TaxPlanning extends Component { ...@@ -1269,11 +1269,18 @@ export default class TaxPlanning extends Component {
let total = 0 let total = 0
dataTable2[tableMeta.rowIndex].map((item, index) => { dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 9 && index <= 20) { if (index >= 9 && index <= 20) {
if (this.props.status === 'CLOSED') {
let indexChild = item.tbf
if (indexChild !== -1) {
total += Number(item.tbf)
}
} else {
let indexChild = item.tbf.formula.findIndex((val) => val.periode === periode) let indexChild = item.tbf.formula.findIndex((val) => val.periode === periode)
if (indexChild !== -1) { if (indexChild !== -1) {
total += Number(item.tbf.formula[indexChild].value) total += Number(item.tbf.formula[indexChild].value)
} }
} }
}
}) })
let nilai = Number(total) + Number(dataTable2[88][21]) let nilai = Number(total) + Number(dataTable2[88][21])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = nilai dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = nilai
......
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