Commit 70a0c2f8 authored by r.kurnia's avatar r.kurnia

taxplan issue prod

parent 09f4ac0a
...@@ -748,7 +748,7 @@ export default class TaxPlanning extends Component { ...@@ -748,7 +748,7 @@ export default class TaxPlanning extends Component {
if (String(i[8]) == "Control (should be nil)") { if (String(i[8]) == "Control (should be nil)") {
this.setState({ loading: true }) this.setState({ loading: true })
let n = 0 let n = 0
for (n = 12; n <= 20; n++) { for ( n = (this.props.quarter == 'q1' ? 12 : (this.props.quarter == 'q2' ? 15 : 18)) ; n <= 20; n++) {
if ((Number(i[n].tbf.value) < Number(this.state.minValue) || Number(i[n].tbf.value) > Number(this.state.maxValue))) { if ((Number(i[n].tbf.value) < Number(this.state.minValue) || Number(i[n].tbf.value) > Number(this.state.maxValue))) {
errorContrl = true errorContrl = true
editAble = true editAble = true
...@@ -1031,12 +1031,12 @@ export default class TaxPlanning extends Component { ...@@ -1031,12 +1031,12 @@ export default class TaxPlanning extends Component {
} }
} else if (dex == 3) { } else if (dex == 3) {
if (tableMeta.rowData[8] == "Corporate Income Tax") { if (tableMeta.rowData[8] == "Corporate Income Tax") {
if (total < 0) { // if (total < 0) {
total = 0 // total = 0
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total).toFixed(2) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = Number(total < 0 ? 0 : total).toFixed(2)
} else { // } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total).toFixed(2) // dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = Number(total).toFixed(2)
} // }
} else if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) { } else if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total).toFixed(1) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total).toFixed(1)
} else { } else {
......
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