Commit 328c4d8a authored by rifkaki's avatar rifkaki

cf ketinggalan

parent 54f17fe9
...@@ -1226,7 +1226,6 @@ export default class SubHolding extends Component { ...@@ -1226,7 +1226,6 @@ export default class SubHolding extends Component {
let ytd_actual = item.cash_flow.ytd_actual == '' ? 0 : Number(item.cash_flow.ytd_actual) let ytd_actual = item.cash_flow.ytd_actual == '' ? 0 : Number(item.cash_flow.ytd_actual)
let ytd = item.cash_flow.ytd == '' ? 0 : Number(item.cash_flow.ytd) let ytd = item.cash_flow.ytd == '' ? 0 : Number(item.cash_flow.ytd)
// let ytd_last_year = item.cash_flow.ytd_last_year == ''? 0 : Number(item.cash_flow.ytd_last_year)
// let persenYtd = Number(ytd_actual / ytd) // let persenYtd = Number(ytd_actual / ytd)
let persenYtd = 0 let persenYtd = 0
...@@ -1241,25 +1240,35 @@ export default class SubHolding extends Component { ...@@ -1241,25 +1240,35 @@ export default class SubHolding extends Component {
persenYtd = Number(ytd_actual/ytd) persenYtd = Number(ytd_actual/ytd)
} }
// let persenYtdLY = 0
// if (ytd_last_year < 0) {
// if (ytd_actual >= ytd_last_year) {
// persenYtdLY = ((ytd_last_year - ytd_actual) / ytd_last_year + 1 )
// } else {
// persenYtdLY = (ytd_last_year - ytd_actual) / ytd_last_year
// }
// }
// else {
// persenYtdLY = Number(ytd_actual/ytd_last_year)
// }
let quarter_actual = item.cash_flow.quarter_actual == '' ? 0 : item.cash_flow.quarter_actual let quarter_actual = item.cash_flow.quarter_actual == '' ? 0 : item.cash_flow.quarter_actual
let quarter = item.cash_flow.quarter == '' ? 0 : item.cash_flow.quarter let quarter = item.cash_flow.quarter == '' ? 0 : item.cash_flow.quarter
let persenQuarter = Number(quarter_actual / quarter) // let persenQuarter = Number(quarter_actual / quarter)
let persenQuarter = 0
if (quarter < 0) {
if (quarter_actual >= quarter) {
persenQuarter = (quarter - quarter_actual) / quarter + 1
} else {
persenQuarter = (quarter - quarter_actual) / quarter
}
}
else {
persenQuarter = quarter_actual / quarter
}
let fy_actual = item.cash_flow.fy_actual == '' ? 0 : item.cash_flow.fy_actual let fy_actual = item.cash_flow.fy_actual == '' ? 0 : item.cash_flow.fy_actual
let fy = item.cash_flow.fy == '' ? 0 : item.cash_flow.fy let fy = item.cash_flow.fy == '' ? 0 : item.cash_flow.fy
let persenFy = Number(fy_actual / fy) // let persenFy = Number(fy_actual / fy)
let persenFy = 0
if (fy < 0) {
if (fy_actual >= fy) {
persenFy = (fy - fy_actual) / fy + 1
} else {
persenFy = (fy - fy_actual) / fy
}
}
else {
persenFy = fy_actual / fy
}
dbSumaCF.push([ dbSumaCF.push([
item.id, item.id,
......
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