Commit 3838bdb2 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'rifka' into 'master'

input tpmr

See merge request !678
parents 7dcb1ad9 20de32fb
...@@ -977,6 +977,7 @@ export default class TaxPlanningMR extends Component { ...@@ -977,6 +977,7 @@ export default class TaxPlanningMR extends Component {
} }
const handleChange = (value, tableMeta, indexChilds) => { const handleChange = (value, tableMeta, indexChilds) => {
console.log(dataTable2)
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
// let data = this.state.dataTable2 // let data = this.state.dataTable2
let indexParent = dataTable2.findIndex((val) => val[4] === dataTable2[tableMeta.rowIndex][5]) let indexParent = dataTable2.findIndex((val) => val[4] === dataTable2[tableMeta.rowIndex][5])
...@@ -1246,7 +1247,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1246,7 +1247,7 @@ export default class TaxPlanningMR extends Component {
</th> </th>
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div> <div>
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
...@@ -1254,7 +1255,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1254,7 +1255,7 @@ export default class TaxPlanningMR extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : null :
val.tbc value.tbc
} }
</div> </div>
</div> </div>
...@@ -1262,7 +1263,29 @@ export default class TaxPlanningMR extends Component { ...@@ -1262,7 +1263,29 @@ export default class TaxPlanningMR extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : null :
val.fcp tableMeta.rowData[0] === 2 ?
null :
tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.fcp}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
value={String(tableMeta.rowData[5]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.fcp).toFixed(2) : Number(value.fcp).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 1)
// console.log(dataTable2)
}}
/>
}
/>
</div>
} }
</div> </div>
</div> </div>
...@@ -1270,7 +1293,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1270,7 +1293,7 @@ export default class TaxPlanningMR extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : null :
val.tbf value.tbf
} }
</div> </div>
</div> </div>
......
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