Commit a6f56315 authored by Deni Rinaldi's avatar Deni Rinaldi

belen skrt skrtt

parent c4e52e80
......@@ -385,14 +385,6 @@ export default class BalanceSheet extends Component {
let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta, type) => {
let val = String(value).split(",").join("")
let total = 0
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 7 && index <= 18) {
let valItem = item == undefined || item == "" ? 0 : item
total += Number(valItem)
}
})
dataTable2[tableMeta.rowIndex][19] = total
if (type === "actual") {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
} else {
......@@ -407,6 +399,18 @@ export default class BalanceSheet extends Component {
}
}
}
const handleTotal = (tableMeta) => {
let total = 0
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 7 && index <= 18) {
let valItem = item == undefined || item == "" ? 0 : item
total += Number(valItem)
}
})
dataTable2[tableMeta.rowIndex][19] = total
return total
// console.log(total);
}
const handleValue = (data) => {
let total = 0
dataTable2.map((item, index) => {
......@@ -1638,7 +1642,7 @@ export default class BalanceSheet extends Component {
type="text"
placeholder=""
disabled={true}
value={value}
value={handleTotal(tableMeta)}
/>
</span>}
</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