Commit a8253b8c authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-' into 'master'

Deni

See merge request !659
parents 5c085c68 e0b3eb6d
......@@ -788,10 +788,20 @@ export default class TaxPlanning extends Component {
splitFormula.map((item) => {
let re = /^[a-zA-Z0-9_]+$/;
let items = String(item).substr(Number(String(item).length) - 1, 1)
let subForm = String(item).substr(0, Number(String(item).length) - 1)
// if (tableMeta.rowData[24] === 96) {
// console.log(item, items);
// }
if (item !== "") {
if (!re.test(items)) {
baru.push(String(item).substr(0, Number(String(item).length) - 1))
baru.push(String(item).substr(Number(String(item).length) - 1, 1))
if (items === '(') {
baru.push(String(item).substr(0, Number(String(item).length) - 2))
baru.push(String(item).substr(Number(String(item).length) - 2, 1))
baru.push(items)
} else {
baru.push(subForm)
baru.push(items)
}
} else {
baru.push(String(item))
}
......@@ -857,7 +867,6 @@ export default class TaxPlanning extends Component {
}
}
})
console.log(anjay);
let total = 0
let total2 = 0
let opt = ""
......@@ -936,8 +945,10 @@ export default class TaxPlanning extends Component {
}
}
total = R.equals(total, NaN) ? "0.0" : total
// console.log(tableMeta.rowData[8], baru, anjay, total);
total = R.equals(total, NaN) ? "0.0" : Number(total).toFixed(1)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
return total
}
......@@ -1218,7 +1229,7 @@ export default class TaxPlanning extends Component {
}
else if (indexChilds == 2) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(val)
} else if (indexChilds == 3){
} else if (indexChilds == 3) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
}
}
......@@ -7436,18 +7447,18 @@ export default class TaxPlanning extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
// console.log(tableMeta.rowData);
// console.log(dataTable2);
return (
<div>
<div className="grid grid-3x content-center">
{/* <div className="col-1"> */}
<div style={{ textAlign: 'right' }}>
{String(tableMeta.rowData[8]).toUpperCase() === 'TAX LOSS CARRY FORWARD' ||
String(tableMeta.rowData[8]).toUpperCase() === 'ADJUSTMENT' ||
String(tableMeta.rowData[8]).toUpperCase() === 'INC TAX ART 22' ||
String(tableMeta.rowData[8]).toUpperCase() === 'INC TAX ART 23' ||
String(tableMeta.rowData[8]).toUpperCase() === 'INC TAX ART 24' ||
String(tableMeta.rowData[8]).toUpperCase() === 'INC TAX ART 25'
{tableMeta.rowData[24] === 81 ||
tableMeta.rowData[24] === 88 ||
tableMeta.rowData[24] === 92 ||
tableMeta.rowData[24] === 93 ||
tableMeta.rowData[24] === 94 ||
tableMeta.rowData[24] === 95
?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -7470,7 +7481,7 @@ export default class TaxPlanning extends Component {
}
/>
</div> :
String(tableMeta.rowData[8]).toUpperCase() === 'INCOME BEFORE TAX (NPBT)' ?
tableMeta.rowData[24] === 77 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -7488,7 +7499,7 @@ export default class TaxPlanning extends Component {
/>
</div>
:
String(tableMeta.rowData[8]).toUpperCase() === 'TAXABLE INCOME' ?
tableMeta.rowData[24] === 83 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -7506,7 +7517,7 @@ export default class TaxPlanning extends Component {
/>
</div>
:
String(tableMeta.rowData[8]).toUpperCase() === 'CORPORATE INCOME TAX' ?
tableMeta.rowData[24] === 87 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -7524,7 +7535,7 @@ export default class TaxPlanning extends Component {
/>
</div>
:
String(tableMeta.rowData[8]).toUpperCase() === 'CORPORATE INCOME TAX AFTER ADJUSTMENT' ?
tableMeta.rowData[24] === 89 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -7542,7 +7553,7 @@ export default class TaxPlanning extends Component {
/>
</div>
:
tableMeta.rowData[8] === "Under payment /(Over Payment ) Income Tax Art. 29" ?
tableMeta.rowData[24] === 96 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -7554,7 +7565,7 @@ export default class TaxPlanning extends Component {
type="text"
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)}
value={Number(handleNewFormula(tableMeta, 3, "@89-(@92+@93+@94+95)")).toFixed(1)}
value={Number(handleNewFormula(tableMeta, 3, "@89-(@92+@93+@94+@95)")).toFixed(1)}
/>
}
/>
......@@ -7613,14 +7624,7 @@ export default class TaxPlanning extends Component {
/>
:
tableMeta.rowData[3] === 1 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta, 1)).toFixed(1)}
/>
null
:
tableMeta.rowData[3] === 7 ?
(Number(handleTotal(tableMeta, 1)) >= Number(this.state.minValue) && Number(handleTotal(tableMeta, 1)) <= Number(this.state.maxValue)) ?
......
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