Commit a6fa5a39 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'riri' into 'master'

PL Issue

See merge request !737
parents 8afce5c3 004a6e53
......@@ -188,7 +188,7 @@ export default class ProfitLoss extends Component {
}
}
})
// console.log(dataTable)
console.log(dataTable)
this.setState({ dataTable, loading: false, buttonError: true, editable: true }, () => {
})
} else {
......@@ -540,8 +540,8 @@ export default class ProfitLoss extends Component {
let indexParent = dataTable2.findIndex((val) => val[1] == tableMeta.rowData[2])
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") {
let value = Number(dataTable2[tableMeta.rowIndex - 2][20]) / Number(dataTable2[tableMeta.rowIndex - 1][20])
dataTable2[tableMeta.rowIndex][20] = R.equals(value, NaN) ? "0.0" : R.equals(value, Infinity) ? "0.0" : value
return R.equals(value, NaN) ? "0.0" : R.equals(value, Infinity) ? "0.0" : value
dataTable2[tableMeta.rowIndex][20] = R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
} else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "total man power") {
let totalTMP = dataTable2[tableMeta.rowIndex][20] = dataTable2[tableMeta.rowIndex][19]
return totalTMP
......@@ -633,13 +633,13 @@ export default class ProfitLoss extends Component {
} else if (opt == "kali") {
total = Number(total) * Number(item)
} else if (opt == "bagi") {
total = R.equals((Number(total) / Number(item)), NaN) ? '0' : R.equals((Number(total) / Number(item)), Infinity) ? '0' : Number(total) / Number(item)
total = R.equals((Number(total) / Number(item)), NaN) ? '0' : (R.equals((Number(total) / Number(item)), Infinity) ? '0' : (Number(total) / Number(item) == "-Infinity") ? "0.0" : Number(total) / Number(item))
} else {
total += Number(item)
}
}
})
total = R.equals(total, NaN) ? "0.0" : R.equals(total, Infinity) ? "0.0" : total
total = R.equals(total, NaN) ? "0.0" : (R.equals(total, Infinity) ? "0.0" : (total == "-Infinity" ? "0.0" : total))
// if (tableMeta.rowData[1] === 20092) {
// console.log(total);
// console.log(arrayJumlah);
......
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