Commit 5fd8cf97 authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'riri' into 'master'

upload plmr ++

See merge request !717
parents 8aed1c07 10c98a66
...@@ -520,6 +520,7 @@ export default class ProfitLoss extends Component { ...@@ -520,6 +520,7 @@ export default class ProfitLoss extends Component {
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
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("")
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
} }
...@@ -540,6 +541,12 @@ export default class ProfitLoss extends Component { ...@@ -540,6 +541,12 @@ export default class ProfitLoss extends Component {
let value = Number(dataTable2[tableMeta.rowIndex - 2][20]) / Number(dataTable2[tableMeta.rowIndex - 1][20]) let value = Number(dataTable2[tableMeta.rowIndex - 2][20]) / Number(dataTable2[tableMeta.rowIndex - 1][20])
dataTable2[tableMeta.rowIndex][20] = R.equals(value, NaN) ? "0.0" : value dataTable2[tableMeta.rowIndex][20] = R.equals(value, NaN) ? "0.0" : value
return R.equals(value, NaN) ? "0.0" : value return R.equals(value, NaN) ? "0.0" : value
} else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "total man power") {
console.log("masuk");
console.log(dataTable2[tableMeta.rowIndex][20]);
console.log(dataTable2[tableMeta.rowIndex][19]);
let totalTMP = dataTable2[tableMeta.rowIndex][20] = dataTable2[tableMeta.rowIndex][19]
return totalTMP
} else if (indexParent !== -1 && String(dataTable2[indexParent][5]).toLocaleUpperCase() == "GROSS PROFIT MARGIN (% OF REVENUE)") { } else if (indexParent !== -1 && String(dataTable2[indexParent][5]).toLocaleUpperCase() == "GROSS PROFIT MARGIN (% OF REVENUE)") {
return handleFormula(0, tableMeta, 0) return handleFormula(0, tableMeta, 0)
} }
......
This diff is collapsed.
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