Commit 97004551 authored by Riri Novita's avatar Riri Novita

rapihin pl

parent 9523c2a0
...@@ -434,6 +434,7 @@ export default class ProfitLoss extends Component { ...@@ -434,6 +434,7 @@ export default class ProfitLoss extends Component {
}, 1000); }, 1000);
} }
}) })
// alert(response.data.status)
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
...@@ -514,20 +515,7 @@ export default class ProfitLoss extends Component { ...@@ -514,20 +515,7 @@ export default class ProfitLoss extends Component {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta, type) => { const handleChange = (value, tableMeta, type) => {
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
if (type === "actual") {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
} else {
// let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
// if (indexParent > 0) {
// console.log(indexParent)
// let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
// let jagain = dataTable2[indexParent][tableMeta.columnIndex]
// a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (Number(jagain) + Number(val))
// } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
// }
}
} }
const handleTotal = (tableMeta) => { const handleTotal = (tableMeta) => {
let total = 0 let total = 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