Commit 1237bf43 authored by d.arizona's avatar d.arizona

update

parent bd70bae7
...@@ -533,6 +533,7 @@ export default class BudgetTahunan extends Component { ...@@ -533,6 +533,7 @@ export default class BudgetTahunan extends Component {
// // console.log(this.state.btnApprove) // // console.log(this.state.btnApprove)
this.historyApproval() this.historyApproval()
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
this.getCashFlow(type)
if (type != undefined) { if (type != undefined) {
this.getCashFlow(type) this.getCashFlow(type)
this.getPL(type) this.getPL(type)
...@@ -1031,12 +1032,14 @@ export default class BudgetTahunan extends Component { ...@@ -1031,12 +1032,14 @@ export default class BudgetTahunan extends Component {
listCF.push(item) listCF.push(item)
}) })
this.payloadCFOneMore(listCF, type) this.setState({dbCF: listCF}, () => {
this.payloadCFOneMore(listCF, type)
})
} }
payloadCFOneMore(list, type) { payloadCFOneMore(list, type) {
let listCF = [] let listCF = []
list.map((item, index) => { this.state.dbCF.map((item, index) => {
if (item[0] == 5 || item[0] == 6 || item[0] == 7) { if (item[0] == 5 || item[0] == 6 || item[0] == 7) {
item[7].value = this.handleValueFormula(index, item[7], item, 7) item[7].value = this.handleValueFormula(index, item[7], item, 7)
item[8].value = this.handleValueFormula(index, item[8], item, 8) item[8].value = this.handleValueFormula(index, item[8], item, 8)
...@@ -1057,35 +1060,40 @@ export default class BudgetTahunan extends Component { ...@@ -1057,35 +1060,40 @@ export default class BudgetTahunan extends Component {
listCF.push(item) listCF.push(item)
}) })
this.payloadCFOneMoreAgain(listCF, type) this.setState({dbCF: listCF}, () => {
} this.olahDataCashFlowOneMore(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.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) { olahDataCashFlowOneMore(list, type) {
console.log(list) console.log(list)
let listCF = [] let listCF = []
...@@ -1189,12 +1197,12 @@ export default class BudgetTahunan extends Component { ...@@ -1189,12 +1197,12 @@ export default class BudgetTahunan extends Component {
// if (this.state.submissionID != null) { // if (this.state.submissionID != null) {
// this.createCashFlow() // this.createCashFlow()
// } // }
if (type != undefined) { // if (type != undefined) {
if (type == 'BS' || type == 'FAM' || type == 'PL') { // if (type == 'BS' || type == 'FAM' || type == 'PL') {
console.log('tarik sis') console.log('tarik sis')
this.createCashFlow() 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