Commit 5f8e3136 authored by r.kurnia's avatar r.kurnia

lagi

parent 8d843dc4
...@@ -948,6 +948,7 @@ export default class TaxPlanning extends Component { ...@@ -948,6 +948,7 @@ export default class TaxPlanning extends Component {
total = R.equals(total, NaN) ? "0.00" : Number(total).toFixed(2) total = R.equals(total, NaN) ? "0.00" : Number(total).toFixed(2)
if (total < 0) { if (total < 0) {
total = 0 total = 0
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
return total return total
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
...@@ -1219,8 +1220,9 @@ export default class TaxPlanning extends Component { ...@@ -1219,8 +1220,9 @@ export default class TaxPlanning extends Component {
} else { } else {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) { if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) {
if (tableMeta.rowData[8] == "Corporate Income Tax") { if (tableMeta.rowData[8] == "Corporate Income Tax") {
if (Number(dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf) < 0) { if (total < 0) {
total = 0 total = 0
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total)
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total)
} }
...@@ -1228,19 +1230,11 @@ export default class TaxPlanning extends Component { ...@@ -1228,19 +1230,11 @@ export default class TaxPlanning extends Component {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total)
} }
} else {
if (tableMeta.rowData[8] == "Corporate Income Tax") {
if (Number(dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value) < 0) {
total = 0
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = Number(total)
}
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = Number(total) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = Number(total)
} }
} }
}
return total return total
} }
......
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