Commit fa551da8 authored by fahrur huzain's avatar fahrur huzain

issue CAT RO MB

parent 2a79ef3e
...@@ -626,21 +626,21 @@ export default class CorporateAnnualTarget extends Component { ...@@ -626,21 +626,21 @@ export default class CorporateAnnualTarget extends Component {
"max_ach": i[10] == null ? "" : i[10].value, "max_ach": i[10] == null ? "" : i[10].value,
"formula": i[11] == null ? "" : i[11].value, "formula": i[11] == null ? "" : i[11].value,
"total_actual_before": String(i[12]) == "" ? "0.0" : String(i[12]), "total_actual_before": String(i[12]) == "" ? "0.0" : String(i[12]),
"january": i[13].value != undefined ? String(Number(i[13].value)) : String(i[13]), "january": i[13].value != undefined ? String(Number(i[13].formula[0].value)/1000) : String(i[13]),
"february": i[14].value != undefined ? String(Number(i[14].value)) : String(i[14]), "february": i[14].value != undefined ? String(Number(i[14].formula[0].value)/1000) : String(i[14]),
"march": i[15].value != undefined ? String(Number(i[15].value)) : String(i[15]), "march": i[15].value != undefined ? String(Number(i[15].formula[0].value)/1000) : String(i[15]),
"april": i[16].value != undefined ? String(Number(i[16].value)) : String(i[16]), "april": i[16].value != undefined ? String(Number(i[16].formula[0].value)/1000) : String(i[16]),
"may": i[17].value != undefined ? String(Number(i[17].value)) : String(i[17]), "may": i[17].value != undefined ? String(Number(i[17].formula[0].value)/1000) : String(i[17]),
"june": i[18].value != undefined ? String(Number(i[18].value)) : String(i[18]), "june": i[18].value != undefined ? String(Number(i[18].formula[0].value)/1000) : String(i[18]),
"july": i[19].value != undefined ? String(Number(i[19].value)) : String(i[19]), "july": i[19].value != undefined ? String(Number(i[19].formula[0].value)/1000) : String(i[19]),
"august": i[20].value != undefined ? String(Number(i[20].value)) : String(i[20]), "august": i[20].value != undefined ? String(Number(i[20].formula[0].value)/1000) : String(i[20]),
"september": i[21].value != undefined ? String(Number(i[21].value)) : String(i[21]), "september": i[21].value != undefined ? String(Number(i[21].formula[0].value)/1000) : String(i[21]),
"october": i[22].value != undefined ? String(Number(i[22].value)) : String(i[22]), "october": i[22].value != undefined ? String(Number(i[22].formula[0].value)/1000) : String(i[22]),
"november": i[23].value != undefined ? String(Number(i[23].value)) : String(i[23]), "november": i[23].value != undefined ? String(Number(i[23].formula[0].value)/1000) : String(i[23]),
"december": i[24].value != undefined ? String(Number(i[24].value)) : String(i[24]), "december": i[24].value != undefined ? String(Number(i[24].formula[1].value)/1000) : String(i[24]),
"total_current_year": String(Number(i[25])) == "" ? "0.0" : String(Number(i[25])), "total_current_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][2]?.value)/1000),
"total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])), "total_next_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][0]?.value)/1000),
"total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])), "total_more_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][1]?.value)/1000),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -799,6 +799,12 @@ export default class CorporateAnnualTarget extends Component { ...@@ -799,6 +799,12 @@ export default class CorporateAnnualTarget extends Component {
// console.log(i[7]) // console.log(i[7])
let b = [] let b = []
// console.log(i[13].value == undefined? 'Y' : 'N') // console.log(i[13].value == undefined? 'Y' : 'N')
if (String(i[6]) == "Revenue"){
console.log(Number(i[30]))
console.log(String(Number(i[30][2]?.value)/1000))
}
data.push({ data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1], "item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_name": String(i[6]), "item_name": String(i[6]),
...@@ -809,22 +815,22 @@ export default class CorporateAnnualTarget extends Component { ...@@ -809,22 +815,22 @@ export default class CorporateAnnualTarget extends Component {
"max_ach": i[10] == null ? "" : i[10].value, "max_ach": i[10] == null ? "" : i[10].value,
"formula": i[11] == null ? "" : i[11].value, "formula": i[11] == null ? "" : i[11].value,
"total_actual_before": String(i[12]) == "" ? "0.0" : String(i[12]), "total_actual_before": String(i[12]) == "" ? "0.0" : String(i[12]),
"january": i[13].value == undefined ? (String(i[13]) == '' ? "0.0" : String(i[13])) : String(i[13].value), "january": i[13].value == undefined ? (String(i[13]) == '' ? "0.0" : String(i[13])) : String(i[13].formula[0].value/1000),
// "january": stateFR ? String(i[13].value) : String(i[13]) == "" ? "0.0" : String(i[13]), // "january": stateFR ? String(i[13].value) : String(i[13]) == "" ? "0.0" : String(i[13]),
"february": i[14].value == undefined ? (String(i[14]) == '' ? "0.0" : String(i[14])) : String(i[14].value), "february": i[14].value == undefined ? (String(i[14]) == '' ? "0.0" : String(i[14])) : String(i[14].formula[0].value/1000),
"march": i[15].value == undefined ? (String(i[15]) == '' ? "0.0" : String(i[15])) : String(i[15].value), "march": i[15].value == undefined ? (String(i[15]) == '' ? "0.0" : String(i[15])) : String(i[15].formula[0].value/1000),
"april": i[16].value == undefined ? (String(i[16]) == '' ? "0.0" : String(i[16])) : String(i[16].value), "april": i[16].value == undefined ? (String(i[16]) == '' ? "0.0" : String(i[16])) : String(i[16].formula[0].value/1000),
"may": i[17].value == undefined ? (String(i[17]) == '' ? "0.0" : String(i[17])) : String(i[17].value), "may": i[17].value == undefined ? (String(i[17]) == '' ? "0.0" : String(i[17])) : String(i[17].formula[0].value/1000),
"june": i[18].value == undefined ? (String(i[18]) == '' ? "0.0" : String(i[18])) : String(i[18].value), "june": i[18].value == undefined ? (String(i[18]) == '' ? "0.0" : String(i[18])) : String(i[18].formula[0].value/1000),
"july": i[19].value == undefined ? (String(i[19]) == '' ? "0.0" : String(i[19])) : String(i[19].value), "july": i[19].value == undefined ? (String(i[19]) == '' ? "0.0" : String(i[19])) : String(i[19].formula[0].value/1000),
"august": i[20].value == undefined ? (String(i[20]) == '' ? "0.0" : String(i[20])) : String(i[20].value), "august": i[20].value == undefined ? (String(i[20]) == '' ? "0.0" : String(i[20])) : String(i[20].formula[0].value/1000),
"september": i[21].value == undefined ? (String(i[21]) == '' ? "0.0" : String(i[21])) : String(i[21].value), "september": i[21].value == undefined ? (String(i[21]) == '' ? "0.0" : String(i[21])) : String(i[21].formula[0].value/1000),
"october": i[22].value == undefined ? (String(i[22]) == '' ? "0.0" : String(i[22])) : String(i[22].value), "october": i[22].value == undefined ? (String(i[22]) == '' ? "0.0" : String(i[22])) : String(i[22].formula[0].value/1000),
"november": i[23].value == undefined ? (String(i[23]) == '' ? "0.0" : String(i[23])) : String(i[23].value), "november": i[23].value == undefined ? (String(i[23]) == '' ? "0.0" : String(i[23])) : String(i[23].formula[0].value/1000),
"december": i[24].value == undefined ? (String(i[24]) == '' ? "0.0" : String(i[24])) : String(i[24].value), "december": i[24].value == undefined ? (String(i[24]) == '' ? "0.0" : String(i[24])) : String(i[24].formula[1].value/1000),
"total_current_year": String(i[25]) == "" ? "0.0" : String(i[25]), "total_current_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][2]?.value)/1000),
"total_next_year": String(i[26]) == "" ? "0.0" : String(i[26]), "total_next_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][0]?.value)/1000),
"total_more_year": String(i[27]) == "" ? "0.0" : String(i[27]), "total_more_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][1]?.value)/1000),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -894,6 +900,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -894,6 +900,7 @@ export default class CorporateAnnualTarget extends Component {
console.log(i[13]?.formula[0].value) console.log(i[13]?.formula[0].value)
} }
// // // // // console.log(i[9] == null? "" : i[9].value) // // // // // console.log(i[9] == null? "" : i[9].value)
if (this.props.defaultCurrency.id == 2) { if (this.props.defaultCurrency.id == 2) {
data.push({ data.push({
...@@ -917,9 +924,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -917,9 +924,10 @@ export default class CorporateAnnualTarget extends Component {
"september": i[21].formula != undefined ? String((Number(i[21]?.formula[0].value))/1000) : String(i[21]), "september": i[21].formula != undefined ? String((Number(i[21]?.formula[0].value))/1000) : String(i[21]),
"october": i[22].formula != undefined ? String((Number(i[22]?.formula[0].value))/1000) : String(i[22]), "october": i[22].formula != undefined ? String((Number(i[22]?.formula[0].value))/1000) : String(i[22]),
"november": i[23].formula != undefined ? String((Number(i[23]?.formula[0].value))/1000) : String(i[23]), "november": i[23].formula != undefined ? String((Number(i[23]?.formula[0].value))/1000) : String(i[23]),
"december": i[24].formula != undefined ? String((Number(i[24]?.formula[0].value))/1000) : String(i[24]), "december": i[24].formula != undefined ? String((Number(i[24]?.formula[1].value))/1000) : String(i[24]),
"total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])), "total_current_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][2]?.value)/1000),
"total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])), "total_next_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][0]?.value)/1000),
"total_more_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][1]?.value)/1000),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -945,10 +953,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -945,10 +953,10 @@ export default class CorporateAnnualTarget extends Component {
"september": i[21].formula != undefined ? String((Number(i[21]?.formula[0].value))/1000) : String(i[21]), "september": i[21].formula != undefined ? String((Number(i[21]?.formula[0].value))/1000) : String(i[21]),
"october": i[22].formula != undefined ? String((Number(i[22]?.formula[0].value))/1000) : String(i[22]), "october": i[22].formula != undefined ? String((Number(i[22]?.formula[0].value))/1000) : String(i[22]),
"november": i[23].formula != undefined ? String((Number(i[23]?.formula[0].value))/1000) : String(i[23]), "november": i[23].formula != undefined ? String((Number(i[23]?.formula[0].value))/1000) : String(i[23]),
"december": i[24].formula != undefined ? String((Number(i[24]?.formula[0].value))/1000) : String(i[24]), "december": i[24].formula != undefined ? String((Number(i[24]?.formula[1].value))/1000) : String(i[24]),
"total_current_year": String(Number(i[25])) == "" ? "0.0" : String(Number(i[25])), "total_current_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][2]?.value)/1000),
"total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])), "total_next_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][0]?.value)/1000),
"total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])), "total_more_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30][1]?.value)/1000),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
......
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