Commit d98bcdfc authored by d.arizona's avatar d.arizona

update pl bs

parent 02bdf788
......@@ -97,6 +97,7 @@ export default class BalanceSheetMR extends Component {
}
this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev})
// this.setState({viewOnly: true})
}
getLatestUpdate() {
......@@ -762,7 +763,7 @@ export default class BalanceSheetMR extends Component {
total = R.equals(selisih/prevMonth, 0)
|| R.equals(selisih/prevMonth, NaN)
|| R.equals(selisih/prevMonth, Infinity)
|| R.equals(selisih/prevMonth, '-Infinity') ? 0 : (selisih/prevMonth) * 100
|| R.equals(selisih/prevMonth, -Infinity) ? 0 : (selisih/prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
......@@ -779,7 +780,7 @@ export default class BalanceSheetMR extends Component {
total = R.equals(selisih/prevMonth, 0)
|| R.equals(selisih/prevMonth, NaN)
|| R.equals(selisih/prevMonth, Infinity)
|| R.equals(selisih/prevMonth, '-Infinity') ? 0 : (selisih/prevMonth) * 100
|| R.equals(selisih/prevMonth, -Infinity) ? 0 : (selisih/prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
......@@ -791,7 +792,7 @@ export default class BalanceSheetMR extends Component {
total = R.equals(selisih/prevMonth, 0)
|| R.equals(selisih/prevMonth, NaN)
|| R.equals(selisih/prevMonth, Infinity)
|| R.equals(selisih/prevMonth, '-Infinity') ? 0 : (selisih/prevMonth) * 100
|| R.equals(selisih/prevMonth, -Infinity) ? 0 : (selisih/prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
......
......@@ -817,11 +817,16 @@ export default class ProfitLossMR extends Component {
if (dex === 1) {
let selisih = Number(dataTable2[tableMeta.rowIndex][13])
let prevMonth = Number(dataTable2[tableMeta.rowIndex][12])
total = R.equals(selisih / prevMonth, 0)
total = (R.equals(selisih / prevMonth, 0)
|| R.equals(selisih / prevMonth, NaN)
|| R.equals(selisih / prevMonth, Infinity)
|| R.equals(selisih / prevMonth, '-Infinity') ? 0 : (selisih / prevMonth) * 100
|| R.equals(selisih / prevMonth, -Infinity)) ? 0 : (selisih / prevMonth) * 100
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'interest expenses - affiliated/shareholders') {
// console.log(selisih)
// console.log(prevMonth)
// console.log(total)
// }
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
// total = Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])
// total = R.equals(Number((Number(dataTable2[tableMeta.rowIndex][13]) /
......@@ -837,7 +842,7 @@ export default class ProfitLossMR extends Component {
total = R.equals(selisih / prevMonth, 0)
|| R.equals(selisih / prevMonth, NaN)
|| R.equals(selisih / prevMonth, Infinity)
|| R.equals(selisih / prevMonth, '-Infinity') ? 0 : (selisih / prevMonth) * 100
|| R.equals(selisih / prevMonth, -Infinity) ? 0 : (selisih / prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
......@@ -850,7 +855,7 @@ export default class ProfitLossMR extends Component {
total = R.equals(selisih / prevMonth, 0)
|| R.equals(selisih / prevMonth, NaN)
|| R.equals(selisih / prevMonth, Infinity)
|| R.equals(selisih / prevMonth, '-Infinity') ? 0 : (selisih / prevMonth) * 100
|| R.equals(selisih / prevMonth, -Infinity) ? 0 : (selisih / prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
// total = Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])
......
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