Commit 6945386a authored by ardyardyaaan's avatar ardyardyaaan

Update Report Summary Cash Flow Add OL and %OL

parent 44b1dcd9
...@@ -2001,6 +2001,18 @@ export default class SubHolding extends Component { ...@@ -2001,6 +2001,18 @@ export default class SubHolding extends Component {
else { else {
persenFy = fy_actual / fy persenFy = fy_actual / fy
} }
let ol = item.cash_flow.fy_ol == '' ? 0 : Number(item.cash_flow.fy_ol)
let persenOL = 0
if (fy < 0) {
if (ol >= fy) {
persenOL = (fy - ol) / fy + 1
} else {
persenOL = (fy - ol) / fy
}
}
else {
persenOL = ol / fy
}
dbSumaCF.push([ dbSumaCF.push([
item.id, item.id,
...@@ -2021,6 +2033,8 @@ export default class SubHolding extends Component { ...@@ -2021,6 +2033,8 @@ export default class SubHolding extends Component {
item.cash_flow.fy_actual, item.cash_flow.fy_actual,
item.cash_flow.fy, item.cash_flow.fy,
isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity' ? (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? persenFy * -100 : persenFy * 100), isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity' ? (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? persenFy * -100 : persenFy * 100),
item.cash_flow.fy_ol,
isNaN(persenOL) || persenOL == 'Infinity' || persenOL == '-Infinity' ? (item.cash_flow.fy_ol == '' || item.cash_flow.fy_ol == 0 ? -0 : 0) : (item.cash_flow.fy_ol == '' || item.cash_flow.fy_ol == 0 ? persenOL * -100 : persenOL * 100),
// isNaN(persenFy)? 0 : persenFy * 100, // isNaN(persenFy)? 0 : persenFy * 100,
item.cash_flow.fy_last_year, item.cash_flow.fy_last_year,
]) ])
...@@ -2094,6 +2108,18 @@ export default class SubHolding extends Component { ...@@ -2094,6 +2108,18 @@ export default class SubHolding extends Component {
else { else {
persenFy = fy_actual / fy persenFy = fy_actual / fy
} }
let ol = item.cash_flow.fy_ol == '' ? 0 : Number(item.cash_flow.fy_ol)
let persenOl = 0
if (fy < 0) {
if (ol >= fy) {
persenOl = (fy - ol) / fy + 1
} else {
persenOl = (fy - ol) / fy
}
}
else {
persenOl = ol / fy
}
dbSumaCF.push([ dbSumaCF.push([
item.id, item.id,
...@@ -2114,6 +2140,8 @@ export default class SubHolding extends Component { ...@@ -2114,6 +2140,8 @@ export default class SubHolding extends Component {
item.cash_flow.fy_actual, item.cash_flow.fy_actual,
item.cash_flow.fy, item.cash_flow.fy,
isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity' ? (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? persenFy * -100 : persenFy * 100), isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity' ? (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? persenFy * -100 : persenFy * 100),
item.cash_flow.fy_ol,
isNaN(persenOl) || persenOl == 'Infinity' || persenOl == '-Infinity' ? (item.cash_flow.fy_ol == '' || item.cash_flow.fy_ol == 0 ? -0 : 0) : (item.cash_flow.fy_ol == '' || item.cash_flow.fy_ol == 0 ? persenOl * -100 : persenOl * 100),
// isNaN(persenFy)? 0 : persenFy * 100, // isNaN(persenFy)? 0 : persenFy * 100,
item.cash_flow.fy_last_year, item.cash_flow.fy_last_year,
]) ])
......
...@@ -19040,6 +19040,18 @@ export default class TableSubHolding extends Component { ...@@ -19040,6 +19040,18 @@ export default class TableSubHolding extends Component {
else { else {
persenFy = fy_actual / fy persenFy = fy_actual / fy
} }
let ol = tableMeta.rowData[124] == '' ? 0 : Number(tableMeta.rowData[124])
let persenOl = 0
if (fy < 0) {
if (ol >= fy) {
persenOl = (fy - ol) / fy + 1
} else {
persenOl = (fy - ol) / fy
}
}
else {
persenOl = ol / fy
}
value = String(type).includes('MTD') ? persenMtd : String(type).includes('YTD') ? persenYtd : String(type).includes('Quarter') ? persenQuarter : persenFy value = String(type).includes('MTD') ? persenMtd : String(type).includes('YTD') ? persenYtd : String(type).includes('Quarter') ? persenQuarter : persenFy
value = (value == Infinity || value == -Infinity || isNaN(value) ? 0 : Number(value * 100).toFixed(1)) value = (value == Infinity || value == -Infinity || isNaN(value) ? 0 : Number(value * 100).toFixed(1))
// value = isNaN(value) || value == 'Infinity' || value == '-Infinity' ? (value == '' || value == 0 ? -0 : 0) : (value== '' || value == 0 ? persenFy * -100 : persenFy * 100) // value = isNaN(value) || value == 'Infinity' || value == '-Infinity' ? (value == '' || value == 0 ? -0 : 0) : (value== '' || value == 0 ? persenFy * -100 : persenFy * 100)
...@@ -19633,7 +19645,6 @@ export default class TableSubHolding extends Component { ...@@ -19633,7 +19645,6 @@ export default class TableSubHolding extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'cash at the end of the period' ? handleCashend(tableMeta, 123, 'percentFY') : Number(tableMeta.rowData[123]).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'cash at the end of the period' ? handleCashend(tableMeta, 123, 'percentFY') : Number(tableMeta.rowData[123]).toFixed(1)}
// value={Number(tableMeta.rowData[123]).toFixed(1)}
suffix={'%'} suffix={'%'}
/> />
} }
...@@ -19683,8 +19694,7 @@ export default class TableSubHolding extends Component { ...@@ -19683,8 +19694,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'cash at the end of the period' ? handleCashend(tableMeta, 123, 'percentFY') : Number(tableMeta.rowData[123]).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'cash at the end of the period' ? handleCashend(tableMeta, 125, 'percentOL') : Number(tableMeta.rowData[125]).toFixed(1)}
// value={Number(tableMeta.rowData[123]).toFixed(1)}
suffix={'%'} suffix={'%'}
/> />
} }
...@@ -19708,8 +19718,7 @@ export default class TableSubHolding extends Component { ...@@ -19708,8 +19718,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'cash at the end of the period' ? handleCashend(tableMeta, 124) : Number(tableMeta.rowData[124]).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'cash at the end of the period' ? handleCashend(tableMeta, 126) : Number(tableMeta.rowData[126]).toFixed(1)}
// value={Number(tableMeta.rowData[124]).toFixed(1)}
/> />
} }
/> />
...@@ -23271,6 +23280,18 @@ export default class TableSubHolding extends Component { ...@@ -23271,6 +23280,18 @@ export default class TableSubHolding extends Component {
display: false display: false
} }
}, },
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
}
] ]
const columnSummaryBS = [ const columnSummaryBS = [
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