Commit 5f5db8a3 authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-DEPLOYMENT'

cf mb

See merge request !1718
parents a595a633 3fa80b1e
...@@ -739,6 +739,39 @@ export default class CashFlow extends Component { ...@@ -739,6 +739,39 @@ export default class CashFlow extends Component {
return total return total
} }
const handleFYTotal = (val, tableMeta) => {
let total = 0
// dataTable2[tableMeta.rowIndex].map((item, index) => {
// if (index == 18) {
// if (index >= 6 && index <= 17) {
// let valItem = item.value == undefined || item.value == "" ? 0 : item.value
// total += Number(valItem)
// }
// }
// })
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 7 && index <= 18) {
let valItem = item.value == undefined || item.value == "" ? 0 : item.value
total += Number(valItem)
}
})
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "cash at the beginning period") {
let totalBeginning = dataTable2[tableMeta.rowIndex][19] = dataTable2[tableMeta.rowIndex][7].value
return totalBeginning
} else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "cash at the end of the period") {
let totalEnd = dataTable2[tableMeta.rowIndex][19] = dataTable2[tableMeta.rowIndex][18].value
return totalEnd
} else {
dataTable2[tableMeta.rowIndex][19] = total
return total
}
// console.log(total);
}
let columns = [ let columns = [
{ {
name: "", name: "",
...@@ -3010,8 +3043,9 @@ export default class CashFlow extends Component { ...@@ -3010,8 +3043,9 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[19].value).toFixed(1) : Number(handleFYTotal(value, tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
value={value} // value={value}
/> />
} }
/> />
......
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