Commit d1a2556f authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Fixing Issue UAT

See merge request !2052
parents 2156322c af827e20
......@@ -167,7 +167,7 @@ export default class BalanceSheet extends Component {
this.props.status === 'CLOSED' ? Number(item.balance_sheet.march) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.april) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.may) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.june) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.june) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.july) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.august) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.september) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september),
......
......@@ -1129,7 +1129,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7]), 1)}
value={fixNumber(Number(tableMeta.rowData[7]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1163,7 +1163,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[7]), 1) : Number(tableMeta.rowData[7])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[7]), 1) : Number(tableMeta.rowData[7]) == 0 ? "0.0" : Number(tableMeta.rowData[7])}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1219,7 +1219,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[8]), 1)}
value={fixNumber(Number(tableMeta.rowData[8]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[8]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1234,7 +1234,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : Number(tableMeta.rowData[8])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : Number(tableMeta.rowData[8]) == 0 ? "0.0" : Number(tableMeta.rowData[8])}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1254,7 +1254,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[9]), 1)}
value={fixNumber(Number(tableMeta.rowData[9]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[9]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1269,7 +1269,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[9]), 1) : Number(tableMeta.rowData[9])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[9]), 1) : Number(tableMeta.rowData[9]) == 0 ? "0.0" : Number(tableMeta.rowData[9])}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1290,7 +1290,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10]), 1)}
value={fixNumber(Number(tableMeta.rowData[10]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10]), 1)}
// decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1306,7 +1306,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={this.props.isApprover ? true : (this.state.get_for == 'view' ? true : false)}
value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[10]), 1) : Number(tableMeta.rowData[10])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[10]), 1) : Number(tableMeta.rowData[10]) == 0 ? "0.0" : Number(tableMeta.rowData[10])}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, "actual")
......@@ -1324,7 +1324,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValue(value, tableMeta)), 1) : Number(handleValue(value, tableMeta))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValue(value, tableMeta)), 1) : Number(handleValue(value, tableMeta)) == 0 ? "0.0" : Number(handleValue(value, tableMeta))}
// value={Number(handleValue(tableMeta, 2)).toFixed(1)}
/>
</span> :
......@@ -1341,7 +1341,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormula(value, tableMeta, 2)), 1) : Number(handleFormula(value, tableMeta, 2))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormula(value, tableMeta, 2)), 1) : Number(handleFormula(value, tableMeta, 2)) == 0 ? "0.0" : Number(handleFormula(value, tableMeta, 2))}
/>
}
/>
......@@ -1357,7 +1357,7 @@ export default class ProfitLossMR extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[10]), 1) : Number(tableMeta.rowData[10])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[10]), 1) : Number(tableMeta.rowData[10]) == 0 ? "0.0" : Number(tableMeta.rowData[10])}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1405,7 +1405,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[23]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[23]), 1)}
value={fixNumber(Number(tableMeta.rowData[23]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[23]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1420,7 +1420,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta.rowData[11], tableMeta)) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta.rowData[11], tableMeta)), 1) : Number(handleTotal(tableMeta.rowData[11], tableMeta))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta.rowData[11], tableMeta)), 1) : Number(handleTotal(tableMeta.rowData[11], tableMeta)) == 0 ? "0.0" : Number(handleTotal(tableMeta.rowData[11], tableMeta))}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1453,7 +1453,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12]), 1)}
value={fixNumber(Number(tableMeta.rowData[12]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1468,7 +1468,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[12]), 1) : Number(tableMeta.rowData[12])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[12]), 1) : Number(tableMeta.rowData[12]) == 0 ? "0.0" : Number(tableMeta.rowData[12])}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1554,7 +1554,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13]), 1)}
value={fixNumber(Number(tableMeta.rowData[13]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1569,7 +1569,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 1, 0)), 1) : Number(handleVariance(tableMeta, 1, 0))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 1, 0)), 1) : Number(handleVariance(tableMeta, 1, 0)) == 0 ? "0.0" : Number(handleVariance(tableMeta, 1, 0))}
// value={Number(tableMeta.rowData[13]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 1, 0)), 1) : Number(handleVariance(tableMeta, 1, 0))}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
......@@ -1592,7 +1592,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[14]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14]), 1)}
value={fixNumber(Number(tableMeta.rowData[14]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1608,7 +1608,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[14]) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 1, 1)), 1)}
value={fixNumber(Number(handleVariancePercent(tableMeta, 1, 1)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 1, 1)), 1)}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariancePercent(tableMeta, 1, 1)), 1) : Number(handleVariancePercent(tableMeta, 1, 1))}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
// value={11}
......@@ -1635,7 +1635,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15]), 1)}
value={fixNumber(Number(tableMeta.rowData[15]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1650,7 +1650,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 2, 2)), 1) : Number(handleVariance(tableMeta, 2, 2))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 2, 2)), 1) : Number(handleVariance(tableMeta, 2, 2)) == 0 ? "0.0" : Number(handleVariance(tableMeta, 2, 2))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 2, 2)), 1) : Number(handleVariance(tableMeta, 2, 2))}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
......@@ -1673,7 +1673,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[16]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16]), 1)}
value={fixNumber(Number(tableMeta.rowData[16]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1689,7 +1689,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[16]) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1)}
value={fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1)}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1) : Number(handleVariancePercent(tableMeta, 2, 3))}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
......@@ -1715,7 +1715,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[17]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[17]), 1)}
value={fixNumber(Number(tableMeta.rowData[17]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[17]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1730,7 +1730,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 3, 4)), 1) : Number(handleVariance(tableMeta, 3, 4))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 3, 4)), 1) : Number(handleVariance(tableMeta, 3, 4)) == 0 ? "0.0" : Number(handleVariance(tableMeta, 3, 4))}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......@@ -1752,7 +1752,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[18]) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[18]), 1)}
value={fixNumber(Number(tableMeta.rowData[18]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[18]), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
:
......@@ -1769,7 +1769,7 @@ export default class ProfitLossMR extends Component {
style={{ color: Number(tableMeta.rowData[18]).toFixed(1) < this.state.minValue || Number(tableMeta.rowData[18]).toFixed(1) > this.state.maxValue ? 'red' : '#000000b0', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[18]) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 3, 5)), 1)}
value={fixNumber(Number(handleVariancePercent(tableMeta, 3, 5)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 3, 5)), 1)}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
/>
}
......
......@@ -1055,7 +1055,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbc) == 0 ? "0.0" : String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.tbc), 2) : fixNumber(Number(value.tbc), 1)}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (fixNumber(Number(value.tbc), 2) == 0 ? "0.0" : fixNumber(Number(value.tbc), 2)) : (fixNumber(Number(value.tbc), 1) == 0 ? "0.0" : fixNumber(Number(value.tbc), 1))}
/>
}
/>
......@@ -1069,7 +1069,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbc) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 1)), 1) : Number(handleParent(tableMeta, 1))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 1)), 1) : Number(handleParent(tableMeta, 1)) == 0 ? "0.0" : Number(handleParent(tableMeta, 1))}
/>
</span>
:
......@@ -1086,7 +1086,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover ? true : (this.state.get_for == 'view' ? true : false)}
value={Number(value.tbc) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(value.tbc), 1) : Number(value.tbc)}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value.tbc), 1) : Number(value.tbc) == 0 ? "0.0" : Number(value.tbc)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 0)
// console.log(dataTable2)
......@@ -1108,7 +1108,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbc) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 1) : Number(handleValueFormula(value, tableMeta, 1))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 1) : Number(handleValueFormula(value, tableMeta, 1)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 1))}
/>
}
/>
......@@ -1135,7 +1135,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.fcp) == 0 ? "0.0" : String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.fcp), 2) : fixNumber(Number(value.fcp), 1)}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (fixNumber(Number(value.fcp), 2) == 0 ? "0.0" : fixNumber(Number(value.fcp), 2)) : (fixNumber(Number(value.fcp), 1) == 0 ? "0.0" : fixNumber(Number(value.fcp), 1))}
/>
}
/>
......@@ -1149,7 +1149,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 2)), 1) : Number(handleParent(tableMeta, 2))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 2)), 1) : Number(handleParent(tableMeta, 2)) == 0 ? "0.0" : Number(handleParent(tableMeta, 2))}
/>
</span>
:
......@@ -1165,7 +1165,7 @@ export default class TaxPlanningMR extends Component {
type="text"
disabled={this.props.isApprover ? true : (this.state.get_for == 'view' ? true : false)}
placeholder="input"
value={Number(value.fcp) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.fcp), 2) : fixNumber(Number(value.fcp), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.fcp) : Number(value.fcp))}
value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.fcp), 2) : fixNumber(Number(value.fcp), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (Number(value.fcp) == 0 ? "0.0" : Number(value.fcp)) : (Number(value.fcp) == 0 ? "0.0" : Number(value.fcp)))}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 1)
// console.log(dataTable2)
......@@ -1187,7 +1187,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.fcp) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 1) : Number(handleValueFormula(value, tableMeta, 2))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 1) : Number(handleValueFormula(value, tableMeta, 2)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 2))}
/>
}
/>
......@@ -1213,7 +1213,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.tbf), 2) : fixNumber(Number(value.tbf), 1)}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (fixNumber(Number(value.tbf), 2) == 0 ? "0.0" : fixNumber(Number(value.tbf), 2)) : (fixNumber(Number(value.tbf), 1) == 0 ? "0.0" : fixNumber(Number(value.tbf), 1))}
/>
}
/>
......@@ -1227,7 +1227,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 3)), 1) : Number(handleParent(tableMeta, 3))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 3)), 1) : Number(handleParent(tableMeta, 3)) == 0 ? "0.0" : Number(handleParent(tableMeta, 3))}
/>
</span>
:
......@@ -1243,7 +1243,7 @@ export default class TaxPlanningMR extends Component {
type="text"
disabled={this.props.isApprover ? true : (this.state.get_for == 'view' ? true : false)}
placeholder="input"
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.tbf), 2) : fixNumber(Number(value.tbf), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.tbf) : Number(value.tbf))}
value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value.tbf), 2) : fixNumber(Number(value.tbf), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (Number(value.tbf) == 0 ? "0.0" : Number(value.tbf)) : (Number(value.tbf) == 0 ? "0.0" : Number(value.tbf)))}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 2)
// console.log(dataTable2)
......@@ -1265,7 +1265,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 2) : fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)) : Number(handleValueFormula(value, tableMeta, 3)))}
value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 2) : fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (Number(handleValueFormula(value, tableMeta, 3)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 3))) : (Number(handleValueFormula(value, tableMeta, 3)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 3))))}
/>
}
/>
......@@ -1288,7 +1288,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 3))}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[14].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1305,7 +1305,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 3))}
/>
</LightTooltip>
:
......@@ -1324,7 +1324,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 3))}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[14].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1341,7 +1341,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value.tbf) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) : Number(handleValueFormula(value, tableMeta, 3)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 3))}
/>
</LightTooltip>
:
......@@ -1386,7 +1386,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[16]) == 0 ? "0.0" : String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(tableMeta.rowData[16]), 2) : fixNumber(Number(tableMeta.rowData[16]), 1)}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (fixNumber(Number(tableMeta.rowData[16]), 2) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16]), 2)) : (fixNumber(Number(tableMeta.rowData[16]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16]), 1))}
/>
}
/>
......@@ -1400,7 +1400,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[16]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 4)), 1) : Number(handleParent(tableMeta, 4))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 4)), 1) : Number(handleParent(tableMeta, 4)) == 0 ? "0.0" : Number(handleParent(tableMeta, 4))}
/>
</span>
:
......@@ -1455,7 +1455,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(handleTotal(value, tableMeta, 4)), 2) : fixNumber(Number(handleTotal(value, tableMeta, 4)), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleTotal(value, tableMeta, 4)) : Number(handleTotal(value, tableMeta, 4)))}
value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(handleTotal(value, tableMeta, 4)), 2) : fixNumber(Number(handleTotal(value, tableMeta, 4)), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (Number(handleTotal(value, tableMeta, 4)) == 0 ? "0.0" : Number(handleTotal(value, tableMeta, 4))) : (Number(handleTotal(value, tableMeta, 4)) == 0 ? "0.0" : Number(handleTotal(value, tableMeta, 4))))}
/>
}
/>
......@@ -1499,7 +1499,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]) == 0 ? "0.0" : String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(tableMeta.rowData[11]), 2) : fixNumber(Number(tableMeta.rowData[11]), 1)}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (fixNumber(Number(tableMeta.rowData[11]), 2) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11]), 2)) : (fixNumber(Number(tableMeta.rowData[11]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11]), 1))}
/>
}
/>
......@@ -1513,7 +1513,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 4)), 1) : Number(handleParent(tableMeta, 4))}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleParent(tableMeta, 4)), 1) : Number(handleParent(tableMeta, 4)) == 0 ? "0.0" : Number(handleParent(tableMeta, 4))}
/>
</span>
:
......@@ -1528,7 +1528,7 @@ export default class TaxPlanningMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value), 2) : fixNumber(Number(value), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value) : Number(value))}
value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? fixNumber(Number(value), 2) : fixNumber(Number(value), 1)) : (String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? (Number(value) == 0 ? "0.0" : Number(value)) : (Number(value) == 0 ? "0.0" : Number(value)))}
/>
}
/>
......
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