Commit 4eede6e4 authored by Riri Novita's avatar Riri Novita

Issue 11 januari

parent d1c375e4
......@@ -220,7 +220,7 @@ export default class CorporateAnnualTargetMR extends Component {
if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
// let weight = String(item.weight).includes('%') ? String(item.weight).substr(0, String(item.weight).length - 1) : String(item.weight)
let weightTB = String(item.corporate_annual_target.weight).includes('%') ? String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1) : String(item.corporate_annual_target.weight)
let weightTB = String(item.corporate_annual_target.weight).includes('%') ? String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1) : String(item.corporate_annual_target.weight) * 100
// console.log(weight)
dataTable.push([
item.type_report_id,
......@@ -284,7 +284,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
res.map((item, index) => {
let weightParent = String(item.corporate_annual_target.weight).includes('%') ? String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1) : String(item.corporate_annual_target.weight)
let weightParent = String(item.corporate_annual_target.weight).includes('%') ? String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1) : String(item.corporate_annual_target.weight) * 100
dataTable.push([
item.type_report_id,
item.id,
......
......@@ -287,7 +287,7 @@ export default class ListOfCreditFacilities extends Component {
backToMonthlyReportLOCF(type) {
console.log('masoook LOCF');
let dataTable2 = this.state.dataTablelocf == undefined || this.state.tambah == 'tambah' || this.state.tambah == 'upload' ? this.state.dataTableLOCF : this.state.dataTablelocf
let dataTable2 = (this.state.dataTablelocf !== undefined && this.state.tambah == 'upload') ? this.state.dataTablelocf : (this.state.dataTablelocf == undefined || this.state.tambah == 'tambah' || this.state.tambah == 'upload') ? this.state.dataTableLOCF : this.state.dataTablelocf
let data = []
let error = false
// this.deleteReport()
......@@ -853,6 +853,9 @@ export default class ListOfCreditFacilities extends Component {
})
let lastArrayLOCF = dataTablelocf[res.length - 1]
let roundDataDiff = fixNumber(Number(lastArrayLOCF[47]), 1)
let roundDataLoan = fixNumber(Number(lastArrayLOCF[48]), 1)
let roundDataPerBS = fixNumber(Number(lastArrayLOCF[49]), 1)
console.log(dataTablelocf);
if (bankNameEmpty) {
if (this.state.get_for == 'view') {
......@@ -864,10 +867,10 @@ export default class ListOfCreditFacilities extends Component {
if (this.state.get_for == 'view') {
console.log("view");
} else {
this.setState({ saveDraft: false, saveComp: lastArrayLOCF[47] == 0 || lastArrayLOCF[47] == '0.0' || lastArrayLOCF[47] == "-0.0" ? false : true })
this.setState({ saveDraft: false, saveComp: roundDataDiff == 0 || roundDataDiff == '0.0' || roundDataDiff == "-0.0" ? false : true })
}
}
this.setState({ dataTablelocf, diffLOCF: lastArrayLOCF[47], totalLoanLOCF: lastArrayLOCF[48], perBSLOCF: lastArrayLOCF[49], loading: false }, () => {
this.setState({ dataTablelocf, diffLOCF: roundDataDiff, totalLoanLOCF: roundDataLoan, perBSLOCF: roundDataPerBS, loading: false }, () => {
this.handleCalculateLOV()
})
}
......@@ -1105,7 +1108,7 @@ export default class ListOfCreditFacilities extends Component {
uploadLOCF(type) {
console.log('masoook LOCF');
let dataTable2 = this.state.dataTablelocf == undefined || this.state.tambah == 'tambah' || this.state.tambah == 'upload' ? this.state.dataTableLOCF : this.state.dataTablelocf
let dataTable2 = (this.state.dataTablelocf !== undefined && this.state.tambah == 'upload') ? this.state.dataTablelocf : (this.state.dataTablelocf == undefined || this.state.tambah == 'tambah' || this.state.tambah == 'upload') ? this.state.dataTableLOCF : this.state.dataTablelocf
let data = []
let error = false
// this.deleteReport()
......
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