Commit acd2cc47 authored by d.arizona's avatar d.arizona

deploy malam

parent 34c8969f
......@@ -208,8 +208,8 @@ export default class BalanceSheetOLPA extends Component {
Number(item.balance_sheet.august).toFixed(1),
Number(item.balance_sheet.september).toFixed(1),
Number(item.balance_sheet.october).toFixed(1),
Number(item.balance_sheet.november).toFixed(1),
Number(item.balance_sheet.december).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: Number(item.balance_sheet.november).toFixed(1), formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: Number(item.balance_sheet.december).toFixed(1), formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
Number(item.balance_sheet.total_current_year).toFixed(1),
item.order,
item.condition_it_should_be,
......@@ -244,8 +244,8 @@ export default class BalanceSheetOLPA extends Component {
Number(item.balance_sheet.august).toFixed(1),
Number(item.balance_sheet.september).toFixed(1),
Number(item.balance_sheet.october).toFixed(1),
Number(item.balance_sheet.november).toFixed(1),
Number(item.balance_sheet.december).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: Number(item.balance_sheet.november).toFixed(1), formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: Number(item.balance_sheet.december).toFixed(1), formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
Number(item.balance_sheet.total_current_year).toFixed(1),
item.order,
item.condition_it_should_be,
......@@ -310,8 +310,8 @@ export default class BalanceSheetOLPA extends Component {
august: i[0] === 3 && i[14] === "" ? "0.0" : String(Number(i[14]).toFixed(1)),
september: i[0] === 3 && i[15] === "" ? "0.0" : String(Number(i[15]).toFixed(1)),
october: i[0] === 3 && i[16] === "" ? "0.0" : String(Number(i[16]).toFixed(1)),
november: i[0] === 3 && i[17] === "" ? "0.0" : String(Number(i[17]).toFixed(1)),
december: i[0] === 3 && i[18] === "" ? "0.0" : String(Number(i[18]).toFixed(1)),
november: i[0] === 3 && i[17] === "" ? "0.0" : (i[0] === 5 || i[0] === 6 || i[0] === 7 ? String(Number(i[17].value).toFixed(1)) : String(Number(i[17]).toFixed(1))),
december: i[0] === 3 && i[18] === "" ? "0.0" : (i[0] === 5 || i[0] === 6 || i[0] === 7 ? String(Number(i[18].value).toFixed(1)) : String(Number(i[18]).toFixed(1))),
total_current_year: i[0] === 3 && i[19] === "" ? "0.0" : String(Number(i[19]).toFixed(1)),
})
})
......@@ -416,8 +416,8 @@ export default class BalanceSheetOLPA extends Component {
Number(item.august).toFixed(1),
Number(item.september).toFixed(1),
Number(item.october).toFixed(1),
Number(item.november).toFixed(1),
Number(item.december).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: Number(item.november).toFixed(1), formula: item.november_formula } : Number(item.november).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: Number(item.december).toFixed(1), formula: item.december_formula } : Number(item.december).toFixed(1),
Number(item.total_current_year).toFixed(1),
item.orders,
item.condition_it_should_be,
......@@ -466,8 +466,8 @@ export default class BalanceSheetOLPA extends Component {
august: i[0] === 3 && i[14] === "" ? "0.0" : String(Number(i[14]).toFixed(1)),
september: i[0] === 3 && i[15] === "" ? "0.0" : String(Number(i[15]).toFixed(1)),
october: i[0] === 3 && i[16] === "" ? "0.0" : String(Number(i[16]).toFixed(1)),
november: i[0] === 3 && i[17] === "" ? "0.0" : String(Number(i[17]).toFixed(1)),
december: i[0] === 3 && i[18] === "" ? "0.0" : String(Number(i[18]).toFixed(1)),
november: i[0] === 3 && i[17] === "" ? "0.0" : (i[0] === 5 || i[0] === 6 || i[0] === 7 ? String(Number(i[17].value).toFixed(1)) : String(Number(i[17]).toFixed(1))),
december: i[0] === 3 && i[18] === "" ? "0.0" : (i[0] === 5 || i[0] === 6 || i[0] === 7 ? String(Number(i[17].value).toFixed(1)) : String(Number(i[18]).toFixed(1))),
total_current_year: i[0] === 3 && i[19] === "" ? "0.0" : String(Number(i[19]).toFixed(1)),
})
})
......@@ -692,16 +692,16 @@ export default class BalanceSheetOLPA extends Component {
anjay.push(valuezz == "" ? 0 : valuezz)
// console.log(valuezz)
}
// } else {
// // console.log(baru);
// // console.log(value);
// let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
// // console.log(indexID)
// if (indexID !== -1) {
// // console.log(value.formula[indexID].value)
// let valuezz = value.formula[indexID].value
// anjay.push(valuezz == "" ? 0 : valuezz)
// }
} else {
// console.log(baru);
// console.log(value);
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
// console.log(indexID)
if (indexID !== -1) {
// console.log(value.formula[indexID].value)
let valuezz = value.formula[indexID].value
anjay.push(valuezz == "" ? 0 : valuezz)
}
}
} else if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '')
......@@ -738,7 +738,11 @@ export default class BalanceSheetOLPA extends Component {
})
// console.log(baru)
// console.log(anjay)
// if (tableMeta.rowData[5] == 'Profit (loss) MTD') {
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// }
let total = 0
let opt = ""
anjay.map((item, index) => {
......@@ -1675,8 +1679,7 @@ export default class BalanceSheetOLPA extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1686,8 +1689,7 @@ export default class BalanceSheetOLPA extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 1 ?
......
......@@ -467,25 +467,26 @@ export default class CashFlow extends Component {
anjay.push(forecastt)
} else {
let tst = String(item).replace('[M-1]', '')
let data = column == 7 ? 18 : column - 1
let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
let tst = String(item).replace('[M-1]', '[M1]')
// let data = column == 7 ? 18 : column - 1
// let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
// console.log(tst)
let indexID = tableMeta.rowData[column].formula.findIndex((val) => val.item_formula == String(`@${tst}`))
if (indexID !== -1) {
let valuezz = tableMeta.rowData[data].formula[indexID].value
if (tableMeta.rowData[5] == "Cash at the beginning period" && column != 7) {
let valuezz = tableMeta.rowData[column].formula[indexID].value
// if (tableMeta.rowData[5] == "Cash at the beginning period" && column == 9) {
// console.log(data)
// console.log(dataTable2[tableMeta.rowIndex+1][5])
// console.log(dataTable2[tableMeta.rowIndex+1][data])
// console.log(dataTable2[tableMeta.rowIndex-1][data].value)
// console.log(dataTable2[tableMeta.rowIndex][data].value)
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
anjay.push(valuezzz == "" ? 0 : valuezzz)
} else {
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
anjay.push(valuezz == "" ? 0 : valuezz)
}
// } else {
// anjay.push(valuezz == "" ? 0 : valuezz)
// }
}
}
} else {
......
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