Commit 0858a9bb authored by Riri Novita's avatar Riri Novita

pl

parent dce04942
...@@ -608,9 +608,9 @@ export default class ProfitLossMR extends Component { ...@@ -608,9 +608,9 @@ export default class ProfitLossMR extends Component {
// console.log(dataTable2[tableMeta.rowIndex]); // console.log(dataTable2[tableMeta.rowIndex]);
} }
const handleChange = (value, tableMeta, type) => { const handleChange = (value, tableMeta, type) => {
console.log(dataTable2);
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
if (type === "actual") { if (type === "actual") {
// console.log(val);
dataTable2[tableMeta.rowIndex][10] = Number(val).toFixed(1) dataTable2[tableMeta.rowIndex][10] = Number(val).toFixed(1)
} else { } else {
let indexParent = dataTable2.findIndex((val) => val[1] === dataTable2[tableMeta.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[1] === dataTable2[tableMeta.rowIndex][2])
...@@ -1069,7 +1069,7 @@ export default class ProfitLossMR extends Component { ...@@ -1069,7 +1069,7 @@ export default class ProfitLossMR extends Component {
disabled={this.props.isApprover} disabled={this.props.isApprover}
value={Number(tableMeta.rowData[10]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta, "actual")
}} }}
/> />
} }
...@@ -1086,7 +1086,7 @@ export default class ProfitLossMR extends Component { ...@@ -1086,7 +1086,7 @@ export default class ProfitLossMR extends Component {
value={Number(handleValue(tableMeta, 2)).toFixed(1)} value={Number(handleValue(tableMeta, 2)).toFixed(1)}
/> />
</span> : </span> :
tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 5 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
......
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