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

tp

parent 77f5899b
...@@ -217,7 +217,7 @@ export default class TaxPlanning extends Component { ...@@ -217,7 +217,7 @@ export default class TaxPlanning extends Component {
} }
} }
}) })
// console.log(dataTable) console.log(dataTable)
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, buttonError: true, editable: true })
} else { } else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
...@@ -336,14 +336,12 @@ export default class TaxPlanning extends Component { ...@@ -336,14 +336,12 @@ export default class TaxPlanning extends Component {
total_next_year: { total_next_year: {
tbc: String(Number(i[22].tbc).toFixed(1)), tbc: String(Number(i[22].tbc).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].fcp).toFixed(2)) : String(Number(i[22].fcp).toFixed(1)), fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].fcp).toFixed(2)) : String(Number(i[22].fcp).toFixed(1)),
// fcp: String(Number(i[22].fcp).toFixed(1)), tbf: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].tbf).toFixed(2)) : String(Number(i[22].tbf).toFixed(1)),
tbf: String(Number(i[22].tbf).toFixed(1))
}, },
total_more_year: { total_more_year: {
tbc: String(Number(i[23].tbc).toFixed(1)), tbc: String(Number(i[23].tbc).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].fcp).toFixed(2)) : String(Number(i[23].fcp).toFixed(1)), fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].fcp).toFixed(2)) : String(Number(i[23].fcp).toFixed(1)),
// fcp: String(Number(i[23].fcp).toFixed(1)), tbf: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].tbf).toFixed(2)) : String(Number(i[23].tbf).toFixed(1)),
tbf: String(Number(i[23].tbf).toFixed(1))
} }
}) })
}) })
...@@ -381,73 +379,73 @@ export default class TaxPlanning extends Component { ...@@ -381,73 +379,73 @@ export default class TaxPlanning extends Component {
january: { january: {
tbc: i[2] === undefined ? "0" : reg.test(String(i[2])) === false ? "0" : String(i[2]).trim(), tbc: i[2] === undefined ? "0" : reg.test(String(i[2])) === false ? "0" : String(i[2]).trim(),
fcp: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[3]).trim()).toFixed(2)) : String(Number(String(i[3]).trim()).toFixed(1)), fcp: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[3]).trim()).toFixed(2)) : String(Number(String(i[3]).trim()).toFixed(1)),
tbf: i[4] === undefined ? "0" : reg.test(String(i[4])) === false ? "0" : String(i[4]).trim(), tbf: i[4] === undefined ? "0" : reg.test(String(i[4])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[4]).trim()).toFixed(2)) : String(Number(String(i[4]).trim()).toFixed(1)),
}, },
february: { february: {
tbc: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(), tbc: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(),
fcp: i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[6]).trim()).toFixed(2)) : String(Number(String(i[6]).trim()).toFixed(1)), fcp: i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[6]).trim()).toFixed(2)) : String(Number(String(i[6]).trim()).toFixed(1)),
tbf: i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[7]).trim(), tbf: i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[7]).trim()).toFixed(2)) : String(Number(String(i[7]).trim()).toFixed(1)),
}, },
march: { march: {
tbc: i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim(), tbc: i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim(),
fcp: i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[9]).trim()).toFixed(2)) : String(Number(String(i[9]).trim()).toFixed(1)), fcp: i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[9]).trim()).toFixed(2)) : String(Number(String(i[9]).trim()).toFixed(1)),
tbf: i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[10]).trim(), tbf: i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[10]).trim()).toFixed(2)) : String(Number(String(i[10]).trim()).toFixed(1)),
}, },
april: { april: {
tbc: i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim(), tbc: i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim(),
fcp: i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[12]).trim()).toFixed(2)) : String(Number(String(i[12]).trim()).toFixed(1)), fcp: i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[12]).trim()).toFixed(2)) : String(Number(String(i[12]).trim()).toFixed(1)),
tbf: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[13]).trim(), tbf: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[13]).trim()).toFixed(2)) : String(Number(String(i[13]).trim()).toFixed(1)),
}, },
may: { may: {
tbc: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(), tbc: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(),
fcp: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[15]).trim()).toFixed(2)) : String(Number(String(i[15]).trim()).toFixed(1)), fcp: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[15]).trim()).toFixed(2)) : String(Number(String(i[15]).trim()).toFixed(1)),
tbf: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim(), tbf: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[16]).trim()).toFixed(2)) : String(Number(String(i[16]).trim()).toFixed(1)),
}, },
june: { june: {
tbc: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(), tbc: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(),
fcp: i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[18]).trim()).toFixed(2)) : String(Number(String(i[18]).trim()).toFixed(1)), fcp: i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[18]).trim()).toFixed(2)) : String(Number(String(i[18]).trim()).toFixed(1)),
tbf: i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[19]).trim(), tbf: i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[19]).trim()).toFixed(2)) : String(Number(String(i[19]).trim()).toFixed(1)),
}, },
july: { july: {
tbc: i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(), tbc: i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(),
fcp: i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[21]).trim()).toFixed(2)) : String(Number(String(i[21]).trim()).toFixed(1)), fcp: i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[21]).trim()).toFixed(2)) : String(Number(String(i[21]).trim()).toFixed(1)),
tbf: i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[22]).trim(), tbf: i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[22]).trim()).toFixed(2)) : String(Number(String(i[22]).trim()).toFixed(1)),
}, },
august: { august: {
tbc: i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim(), tbc: i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim(),
fcp: i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[24]).trim()).toFixed(2)) : String(Number(String(i[24]).trim()).toFixed(1)), fcp: i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[24]).trim()).toFixed(2)) : String(Number(String(i[24]).trim()).toFixed(1)),
tbf: i[25] === undefined ? "0" : reg.test(String(i[25])) === false ? "0" : String(i[25]).trim(), tbf: i[25] === undefined ? "0" : reg.test(String(i[25])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[25]).trim()).toFixed(2)) : String(Number(String(i[25]).trim()).toFixed(1)),
}, },
september: { september: {
tbc: i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim(), tbc: i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim(),
fcp: i[27] === undefined ? "0" : reg.test(String(i[27])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[27]).trim()).toFixed(2)) : String(Number(String(i[27]).trim()).toFixed(1)), fcp: i[27] === undefined ? "0" : reg.test(String(i[27])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[27]).trim()).toFixed(2)) : String(Number(String(i[27]).trim()).toFixed(1)),
tbf: i[28] === undefined ? "0" : reg.test(String(i[28])) === false ? "0" : String(i[28]).trim(), tbf: i[28] === undefined ? "0" : reg.test(String(i[28])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[28]).trim()).toFixed(2)) : String(Number(String(i[28]).trim()).toFixed(1)),
}, },
october: { october: {
tbc: i[29] === undefined ? "0" : reg.test(String(i[29])) === false ? "0" : String(i[29]).trim(), tbc: i[29] === undefined ? "0" : reg.test(String(i[29])) === false ? "0" : String(i[29]).trim(),
fcp: i[30] === undefined ? "0" : reg.test(String(i[30])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[30]).trim()).toFixed(2)) : String(Number(String(i[30]).trim()).toFixed(1)), fcp: i[30] === undefined ? "0" : reg.test(String(i[30])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[30]).trim()).toFixed(2)) : String(Number(String(i[30]).trim()).toFixed(1)),
tbf: i[31] === undefined ? "0" : reg.test(String(i[31])) === false ? "0" : String(i[31]).trim(), tbf: i[31] === undefined ? "0" : reg.test(String(i[31])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[31]).trim()).toFixed(2)) : String(Number(String(i[31]).trim()).toFixed(1)),
}, },
november: { november: {
tbc: i[32] === undefined ? "0" : reg.test(String(i[32])) === false ? "0" : String(i[32]).trim(), tbc: i[32] === undefined ? "0" : reg.test(String(i[32])) === false ? "0" : String(i[32]).trim(),
fcp: i[33] === undefined ? "0" : reg.test(String(i[33])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[33]).trim()).toFixed(2)) : String(Number(String(i[33]).trim()).toFixed(1)), fcp: i[33] === undefined ? "0" : reg.test(String(i[33])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[33]).trim()).toFixed(2)) : String(Number(String(i[33]).trim()).toFixed(1)),
tbf: i[34] === undefined ? "0" : reg.test(String(i[34])) === false ? "0" : String(i[34]).trim(), tbf: i[34] === undefined ? "0" : reg.test(String(i[34])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[34]).trim()).toFixed(2)) : String(Number(String(i[34]).trim()).toFixed(1)),
}, },
december: { december: {
tbc: i[35] === undefined ? "0" : reg.test(String(i[35])) === false ? "0" : String(i[35]).trim(), tbc: i[35] === undefined ? "0" : reg.test(String(i[35])) === false ? "0" : String(i[35]).trim(),
fcp: i[36] === undefined ? "0" : reg.test(String(i[36])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[36]).trim()).toFixed(2)) : String(Number(String(i[36]).trim()).toFixed(1)), fcp: i[36] === undefined ? "0" : reg.test(String(i[36])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[36]).trim()).toFixed(2)) : String(Number(String(i[36]).trim()).toFixed(1)),
tbf: i[37] === undefined ? "0" : reg.test(String(i[37])) === false ? "0" : String(i[37]).trim(), tbf: i[37] === undefined ? "0" : reg.test(String(i[37])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[37]).trim()).toFixed(2)) : String(Number(String(i[37]).trim()).toFixed(1)),
}, },
total_current_year: i[38] === undefined ? "" : String(i[38]).trim(), total_current_year: i[38] === undefined ? "" : String(i[38]).trim(),
total_next_year: { total_next_year: {
tbc: i[39] === undefined ? "0" : reg.test(String(i[39])) === false ? "0" : String(i[39]).trim(), tbc: i[39] === undefined ? "0" : reg.test(String(i[39])) === false ? "0" : String(i[39]).trim(),
fcp: i[40] === undefined ? "0" : reg.test(String(i[40])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[40]).trim()).toFixed(2)) : String(Number(String(i[40]).trim()).toFixed(1)), fcp: i[40] === undefined ? "0" : reg.test(String(i[40])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[40]).trim()).toFixed(2)) : String(Number(String(i[40]).trim()).toFixed(1)),
tbf: i[41] === undefined ? "0" : reg.test(String(i[41])) === false ? "0" : String(i[41]).trim(), tbf: i[41] === undefined ? "0" : reg.test(String(i[41])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[41]).trim()).toFixed(2)) : String(Number(String(i[41]).trim()).toFixed(1)),
}, },
total_more_year: { total_more_year: {
tbc: i[42] === undefined ? "0" : reg.test(String(i[42])) === false ? "0" : String(i[42]).trim(), tbc: i[42] === undefined ? "0" : reg.test(String(i[42])) === false ? "0" : String(i[42]).trim(),
fcp: i[43] === undefined ? "0" : reg.test(String(i[43])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[43]).trim()).toFixed(2)) : String(Number(String(i[43]).trim()).toFixed(1)), fcp: i[43] === undefined ? "0" : reg.test(String(i[43])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[43]).trim()).toFixed(2)) : String(Number(String(i[43]).trim()).toFixed(1)),
tbf: i[44] === undefined ? "0" : reg.test(String(i[44])) === false ? "0" : String(i[44]).trim(), tbf: i[44] === undefined ? "0" : reg.test(String(i[44])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[44]).trim()).toFixed(2)) : String(Number(String(i[44]).trim()).toFixed(1)),
} }
}) })
} }
...@@ -598,12 +596,12 @@ export default class TaxPlanning extends Component { ...@@ -598,12 +596,12 @@ export default class TaxPlanning extends Component {
total_next_year: { total_next_year: {
tbc: String(Number(i[22].tbc).toFixed(1)), tbc: String(Number(i[22].tbc).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].fcp).toFixed(2)) : String(Number(i[22].fcp).toFixed(1)), fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].fcp).toFixed(2)) : String(Number(i[22].fcp).toFixed(1)),
tbf: String(Number(i[22].tbf).toFixed(1)) tbf: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].tbf).toFixed(2)) : String(Number(i[22].tbf).toFixed(1))
}, },
total_more_year: { total_more_year: {
tbc: String(Number(i[23].tbc).toFixed(1)), tbc: String(Number(i[23].tbc).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].fcp).toFixed(2)) : String(Number(i[23].fcp).toFixed(1)), fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].fcp).toFixed(2)) : String(Number(i[23].fcp).toFixed(1)),
tbf: String(Number(i[23].tbf).toFixed(1)) tbf: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].tbf).toFixed(2)) : String(Number(i[23].tbf).toFixed(1))
} }
}) })
}) })
...@@ -946,10 +944,15 @@ export default class TaxPlanning extends Component { ...@@ -946,10 +944,15 @@ export default class TaxPlanning extends Component {
} }
// console.log(tableMeta.rowData[8], baru, anjay, total); // console.log(tableMeta.rowData[8], baru, anjay, total);
if (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX") {
total = R.equals(total, NaN) ? "0.0" : Number(total).toFixed(1) total = R.equals(total, NaN) ? "0.00" : Number(total).toFixed(2)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
return total return total
} else {
total = R.equals(total, NaN) ? "0.0" : Number(total).toFixed(1)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
return total
}
} }
const handleValueFormula = (value, tableMeta, dex, xntd, forecast, periode) => { const handleValueFormula = (value, tableMeta, dex, xntd, forecast, periode) => {
...@@ -1278,8 +1281,16 @@ export default class TaxPlanning extends Component { ...@@ -1278,8 +1281,16 @@ export default class TaxPlanning extends Component {
} }
}) })
} }
dataTable2[tableMeta.rowIndex][21] = Number(total).toFixed(1)
return total if (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX") {
dataTable2[tableMeta.rowIndex][21] = Number(total).toFixed(2)
console.log(dataTable2[tableMeta.rowIndex][21])
console.log(total)
return total
} else {
dataTable2[tableMeta.rowIndex][21] = Number(total).toFixed(1)
return total
}
} }
const handleValue = (data) => { const handleValue = (data) => {
let total = 0 let total = 0
...@@ -1775,7 +1786,7 @@ export default class TaxPlanning extends Component { ...@@ -1775,7 +1786,7 @@ export default class TaxPlanning extends Component {
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.fcp).toFixed(2) : Number(value.fcp).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.fcp).toFixed(2) : Number(value.fcp).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 1) handleChange(event.target.value, tableMeta, 1)
// console.log(dataTable2) console.log(dataTable2)
}} }}
/> />
} }
...@@ -1993,7 +2004,7 @@ export default class TaxPlanning extends Component { ...@@ -1993,7 +2004,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
...@@ -2473,14 +2484,14 @@ export default class TaxPlanning extends Component { ...@@ -2473,14 +2484,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -2962,14 +2973,14 @@ export default class TaxPlanning extends Component { ...@@ -2962,14 +2973,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -3450,14 +3461,14 @@ export default class TaxPlanning extends Component { ...@@ -3450,14 +3461,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -3940,14 +3951,14 @@ export default class TaxPlanning extends Component { ...@@ -3940,14 +3951,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -4430,14 +4441,14 @@ export default class TaxPlanning extends Component { ...@@ -4430,14 +4441,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -4920,14 +4931,14 @@ export default class TaxPlanning extends Component { ...@@ -4920,14 +4931,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -5410,14 +5421,14 @@ export default class TaxPlanning extends Component { ...@@ -5410,14 +5421,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -5900,14 +5911,14 @@ export default class TaxPlanning extends Component { ...@@ -5900,14 +5911,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -6390,14 +6401,14 @@ export default class TaxPlanning extends Component { ...@@ -6390,14 +6401,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -6880,14 +6891,14 @@ export default class TaxPlanning extends Component { ...@@ -6880,14 +6891,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -7370,14 +7381,14 @@ export default class TaxPlanning extends Component { ...@@ -7370,14 +7381,14 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[3] === 6 ? tableMeta.rowData[3] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
<NumberFormat <NumberFormat
...@@ -7497,7 +7508,7 @@ export default class TaxPlanning extends Component { ...@@ -7497,7 +7508,7 @@ export default class TaxPlanning extends Component {
} }
/> />
</div> : </div> :
tableMeta.rowData[24] === 77 ? tableMeta.rowData[8] === "Income Before Tax (NPBT)" ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -7545,7 +7556,7 @@ export default class TaxPlanning extends Component { ...@@ -7545,7 +7556,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
value={Number(handleNewFormula(tableMeta, 3, "@83*@87#TP2")).toFixed(1)} value={Number(handleNewFormula(tableMeta, 3, "@83*@87#TP2")).toFixed(2)}
/> />
} }
/> />
...@@ -8160,7 +8171,7 @@ export default class TaxPlanning extends Component { ...@@ -8160,7 +8171,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode) + 1, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleForecast(tableMeta, Number(this.props.periode) + 1, 3)).toFixed(2) : Number(handleForecast(tableMeta, Number(this.props.periode) + 1, 3)).toFixed(1)}
/> />
// null // null
: :
...@@ -8689,7 +8700,7 @@ export default class TaxPlanning extends Component { ...@@ -8689,7 +8700,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode) + 2, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleForecast(tableMeta, Number(this.props.periode) + 2, 3)).toFixed(2) : Number(handleForecast(tableMeta, Number(this.props.periode) + 2, 3)).toFixed(1)}
/> />
// null // null
: :
......
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