Commit cca7fefd authored by Riri Novita's avatar Riri Novita

sales price

parent e08e6cbb
...@@ -777,11 +777,27 @@ export default class ProfitLossROO extends Component { ...@@ -777,11 +777,27 @@ export default class ProfitLossROO extends Component {
total += Number(item) total += Number(item)
} }
}) })
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
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 == "-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
// } else if (indexParent !== -1 && String(dataTable2[indexParent][5]).toLocaleUpperCase() == "GROSS PROFIT MARGIN (% OF REVENUE)") {
// return handleFormula(0, tableMeta, 0)
// }
else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
return total
}
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
// if (String(tableMeta.rowData[5]).toLocaleLowerCase === "sales volume") { // if (String(tableMeta.rowData[5]).toLocaleLowerCase === "sales volume") {
// console.log(total); // console.log(total);
// } // }
return total // return total
} }
let columns = [ let columns = [
......
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