Commit 4b62c50e authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

update

See merge request !1230
parents bd70bae7 1237bf43
......@@ -533,6 +533,7 @@ export default class BudgetTahunan extends Component {
// // console.log(this.state.btnApprove)
this.historyApproval()
this.getLatestPeriodSubmit()
this.getCashFlow(type)
if (type != undefined) {
this.getCashFlow(type)
this.getPL(type)
......@@ -1031,12 +1032,14 @@ export default class BudgetTahunan extends Component {
listCF.push(item)
})
this.payloadCFOneMore(listCF, type)
this.setState({dbCF: listCF}, () => {
this.payloadCFOneMore(listCF, type)
})
}
payloadCFOneMore(list, type) {
let listCF = []
list.map((item, index) => {
this.state.dbCF.map((item, index) => {
if (item[0] == 5 || item[0] == 6 || item[0] == 7) {
item[7].value = this.handleValueFormula(index, item[7], item, 7)
item[8].value = this.handleValueFormula(index, item[8], item, 8)
......@@ -1057,35 +1060,40 @@ export default class BudgetTahunan extends Component {
listCF.push(item)
})
this.payloadCFOneMoreAgain(listCF, type)
}
payloadCFOneMoreAgain(list, type) {
let listCF = []
list.map((item, index) => {
if (item[0] == 5 || item[0] == 6 || item[0] == 7) {
item[7].value = this.handleValueFormula(index, item[7], item, 7)
item[8].value = this.handleValueFormula(index, item[8], item, 8)
item[9].value = this.handleValueFormula(index, item[9], item, 9)
item[10].value = this.handleValueFormula(index, item[10], item, 10)
item[11].value = this.handleValueFormula(index, item[11], item, 11)
item[12].value = this.handleValueFormula(index, item[12], item, 12)
item[13].value = this.handleValueFormula(index, item[13], item, 13)
item[14].value = this.handleValueFormula(index, item[14], item, 14)
item[15].value = this.handleValueFormula(index, item[15], item, 15)
item[16].value = this.handleValueFormula(index, item[16], item, 16)
item[17].value = this.handleValueFormula(index, item[17], item, 17)
item[18].value = this.handleValueFormula(index, item[18], item, 18)
item[19] = this.handleForecast(index, item, `${Number(this.state.periode.periode)}`, 19)
item[20] = this.handleForecast(index, item, `${Number(this.state.periode.periode) + 1}`, 20)
item[21] = this.handleForecast(index, item, `${Number(this.state.periode.periode) + 2}`, 21)
}
listCF.push(item)
this.setState({dbCF: listCF}, () => {
this.olahDataCashFlowOneMore(listCF, type)
})
this.olahDataCashFlowOneMore(listCF, type)
}
// payloadCFOneMoreAgain(list, type) {
// let listCF = []
// this.state.dbCF.map((item, index) => {
// if (item[0] == 5 || item[0] == 6 || item[0] == 7) {
// item[7].value = this.handleValueFormula(index, item[7], item, 7)
// item[8].value = this.handleValueFormula(index, item[8], item, 8)
// item[9].value = this.handleValueFormula(index, item[9], item, 9)
// item[10].value = this.handleValueFormula(index, item[10], item, 10)
// item[11].value = this.handleValueFormula(index, item[11], item, 11)
// item[12].value = this.handleValueFormula(index, item[12], item, 12)
// item[13].value = this.handleValueFormula(index, item[13], item, 13)
// item[14].value = this.handleValueFormula(index, item[14], item, 14)
// item[15].value = this.handleValueFormula(index, item[15], item, 15)
// item[16].value = this.handleValueFormula(index, item[16], item, 16)
// item[17].value = this.handleValueFormula(index, item[17], item, 17)
// item[18].value = this.handleValueFormula(index, item[18], item, 18)
// item[19] = this.handleForecast(index, item, `${Number(this.state.periode.periode)}`, 19)
// item[20] = this.handleForecast(index, item, `${Number(this.state.periode.periode) + 1}`, 20)
// item[21] = this.handleForecast(index, item, `${Number(this.state.periode.periode) + 2}`, 21)
// }
// listCF.push(item)
// })
// this.setState({dbCF: listCF}, () => {
// this.olahDataCashFlowOneMore(listCF, type)
// })
// }
olahDataCashFlowOneMore(list, type) {
console.log(list)
let listCF = []
......@@ -1189,12 +1197,12 @@ export default class BudgetTahunan extends Component {
// if (this.state.submissionID != null) {
// this.createCashFlow()
// }
if (type != undefined) {
if (type == 'BS' || type == 'FAM' || type == 'PL') {
// if (type != undefined) {
// if (type == 'BS' || type == 'FAM' || type == 'PL') {
console.log('tarik sis')
this.createCashFlow()
}
}
// }
// }
})
}
......
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