Commit 7fcd3a61 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

issue

See merge request !1503
parents 7fef07b6 e8e72a40
...@@ -2544,16 +2544,34 @@ export default class SubHolding extends Component { ...@@ -2544,16 +2544,34 @@ export default class SubHolding extends Component {
persenFyLY = fy_actual / fy_last_year persenFyLY = fy_actual / fy_last_year
} }
let persenFyOLMB = Number(fy_ol/fy_mb) // if (item.id === 3297327) {
// console.log(fy_actual);
// console.log(fy_last_year);
// console.log(persenFyLY);
// }
// let persenFyOLMB = Number(fy_ol/fy_mb)
// if (fy_mb < 0) {
// if (fy_ol >= fy_mb) {
// persenFyLY = (fy_mb - fy_ol) / fy_mb + 1
// } else {
// persenFyLY = (fy_mb - fy_ol) / fy_mb
// }
// }
// else {
// persenFyLY = fy_ol / fy_mb
// }
let persenFyOLMB = 0
if (fy_mb < 0) { if (fy_mb < 0) {
if (fy_ol >= fy_mb) { if (fy_ol >= fy_mb) {
persenFyLY = (fy_mb - fy_ol) / fy_mb + 1 persenFyOLMB = (fy_mb - fy_ol) / fy_mb + 1
} else { } else {
persenFyLY = (fy_mb - fy_ol) / fy_mb persenFyOLMB = (fy_mb - fy_ol) / fy_mb
} }
} }
else { else {
persenFyLY = fy_ol / fy_mb persenFyOLMB = fy_ol / fy_mb
} }
dbSumaPL.push([ dbSumaPL.push([
...@@ -2752,17 +2770,29 @@ export default class SubHolding extends Component { ...@@ -2752,17 +2770,29 @@ export default class SubHolding extends Component {
persenFyLY = fy_actual / fy_last_year persenFyLY = fy_actual / fy_last_year
} }
let persenFyOLMB = Number(fy_ol/fy_mb) // let persenFyOLMB = Number(fy_ol/fy_mb)
if (fy_mb < 0) { // if (fy_mb < 0) {
if (fy_ol >= fy_mb) { // if (fy_ol >= fy_mb) {
persenFyLY = (fy_mb - fy_ol) / fy_mb + 1 // persenFyLY = (fy_mb - fy_ol) / fy_mb + 1
} else { // } else {
persenFyLY = (fy_mb - fy_ol) / fy_mb // persenFyLY = (fy_mb - fy_ol) / fy_mb
// }
// }
// else {
// persenFyLY = fy_ol / fy_mb
// }
let persenFyOLMB = 0
if (fy_mb < 0) {
if (fy_ol >= fy_mb) {
persenFyOLMB = (fy_mb - fy_ol) / fy_mb + 1
} else {
persenFyOLMB = (fy_mb - fy_ol) / fy_mb
}
}
else {
persenFyOLMB = fy_ol / fy_mb
} }
}
else {
persenFyLY = fy_ol / fy_mb
}
dbSumaPL.push([ dbSumaPL.push([
item.type_report_id, item.type_report_id,
...@@ -2806,6 +2836,7 @@ export default class SubHolding extends Component { ...@@ -2806,6 +2836,7 @@ export default class SubHolding extends Component {
} }
} }
}) })
console.log(dbSumaPL);
this.setState({ dataTable: dbSumaPL, loading: false, previewTable: true, previewDownload: true }) this.setState({ dataTable: dbSumaPL, loading: false, previewTable: true, previewDownload: true })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
...@@ -2820,6 +2851,7 @@ export default class SubHolding extends Component { ...@@ -2820,6 +2851,7 @@ export default class SubHolding extends Component {
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
} else if (this.state.report.value === 9) { } else if (this.state.report.value === 9) {
let FRID = null let FRID = null
......
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