Commit deb5fb05 authored by fahrur huzain's avatar fahrur huzain

issue CAT

parent c2ee5b1b
...@@ -616,7 +616,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -616,7 +616,7 @@ export default class CorporateAnnualTarget extends Component {
} else { } else {
stateFR = false stateFR = false
} }
if (this.state.defaultCurrencyUpload?.id == 2) { // if (this.state.defaultCurrencyUpload?.id == 2) {
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_report": String(i[6]), "item_report": String(i[6]),
...@@ -626,53 +626,53 @@ export default class CorporateAnnualTarget extends Component { ...@@ -626,53 +626,53 @@ 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" : (Number(i[30].length)) > 0 ? String(Number(i[30][2]?.value)/1000) : String(i[25]),
"total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])), "total_next_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][0]?.value)/1000) : String(i[26]),
"total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])), "total_more_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][1]?.value)/1000) : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
} else { // } else {
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_report": String(i[6]), // "item_report": String(i[6]),
"weight": String(i[7]), // "weight": String(i[7]),
"uom": String(i[8]), // "uom": String(i[8]),
"kpi_type": i[9] == null ? "" : i[9].value, // "kpi_type": i[9] == null ? "" : i[9].value,
"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(fixNumber(Number(i[13].value), 1)) : String(i[13]), // "january": i[13].value != undefined ? String(fixNumber(Number(i[13].value), 1)) : String(i[13]),
"february": i[14].value != undefined ? String(fixNumber(Number(i[14].value), 1)) : String(i[14]), // "february": i[14].value != undefined ? String(fixNumber(Number(i[14].value), 1)) : String(i[14]),
"march": i[15].value != undefined ? String(fixNumber(Number(i[15].value), 1)) : String(i[15]), // "march": i[15].value != undefined ? String(fixNumber(Number(i[15].value), 1)) : String(i[15]),
"april": i[16].value != undefined ? String(fixNumber(Number(i[16].value), 1)) : String(i[16]), // "april": i[16].value != undefined ? String(fixNumber(Number(i[16].value), 1)) : String(i[16]),
"may": i[17].value != undefined ? String(fixNumber(Number(i[17].value), 1)) : String(i[17]), // "may": i[17].value != undefined ? String(fixNumber(Number(i[17].value), 1)) : String(i[17]),
"june": i[18].value != undefined ? String(fixNumber(Number(i[18].value), 1)) : String(i[18]), // "june": i[18].value != undefined ? String(fixNumber(Number(i[18].value), 1)) : String(i[18]),
"july": i[19].value != undefined ? String(fixNumber(Number(i[19].value), 1)) : String(i[19]), // "july": i[19].value != undefined ? String(fixNumber(Number(i[19].value), 1)) : String(i[19]),
"august": i[20].value != undefined ? String(fixNumber(Number(i[20].value), 1)) : String(i[20]), // "august": i[20].value != undefined ? String(fixNumber(Number(i[20].value), 1)) : String(i[20]),
"september": i[21].value != undefined ? String(fixNumber(Number(i[21].value), 1)) : String(i[21]), // "september": i[21].value != undefined ? String(fixNumber(Number(i[21].value), 1)) : String(i[21]),
"october": i[22].value != undefined ? String(fixNumber(Number(i[22].value), 1)) : String(i[22]), // "october": i[22].value != undefined ? String(fixNumber(Number(i[22].value), 1)) : String(i[22]),
"november": i[23].value != undefined ? String(fixNumber(Number(i[23].value), 1)) : String(i[23]), // "november": i[23].value != undefined ? String(fixNumber(Number(i[23].value), 1)) : String(i[23]),
"december": i[24].value != undefined ? String(fixNumber(Number(i[24].value), 1)) : String(i[24]), // "december": i[24].value != undefined ? String(fixNumber(Number(i[24].value), 1)) : String(i[24]),
"total_current_year": String(fixNumber(Number(i[25]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[25]), 1)), // "total_current_year": String(fixNumber(Number(i[25]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[25]), 1)),
"total_next_year": String(fixNumber(Number(i[26]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[26]), 1)), // "total_next_year": String(fixNumber(Number(i[26]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[26]), 1)),
"total_more_year": String(fixNumber(Number(i[27]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[27]), 1)), // "total_more_year": String(fixNumber(Number(i[27]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[27]), 1)),
"strategic": String(i[28]), // "strategic": String(i[28]),
"pic": String(i[29]) // "pic": String(i[29])
}) // })
} // }
}) })
let body = { let body = {
...@@ -809,22 +809,22 @@ export default class CorporateAnnualTarget extends Component { ...@@ -809,22 +809,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" : (Number(i[30].length)) > 0 ? String(Number(i[30][2]?.value)/1000) : String(i[25]),
"total_next_year": String(i[26]) == "" ? "0.0" : String(i[26]), "total_next_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][0]?.value)/1000) : String(i[26]),
"total_more_year": String(i[27]) == "" ? "0.0" : String(i[27]), "total_more_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][1]?.value)/1000) : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -868,7 +868,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -868,7 +868,7 @@ export default class CorporateAnnualTarget extends Component {
backToMasterBudget(type) { backToMasterBudget(type) {
let data = [] let data = []
let stateFR = false let stateFR = false
// // // console.log(this.state.dataTable) console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
if (i[2] !== null) { if (i[2] !== null) {
let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2]) let indexID = this.state.dataTable.findIndex((val) => val[1] == i[2])
...@@ -885,6 +885,16 @@ export default class CorporateAnnualTarget extends Component { ...@@ -885,6 +885,16 @@ export default class CorporateAnnualTarget extends Component {
} else { } else {
stateFR = false stateFR = false
} }
if (i[13]?.formula != undefined){
i[13].formula.map((item) =>{
console.log(item.value)
})
}
if (i[13]?.formula != undefined){
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({
...@@ -897,21 +907,21 @@ export default class CorporateAnnualTarget extends Component { ...@@ -897,21 +907,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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].formula != 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].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" : (Number(i[30].length)) > 0 ? String(Number(i[30][2]?.value)/1000) : String(i[25]),
"total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])), "total_next_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][0]?.value)/1000) : String(i[26]),
"total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])), "total_more_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][1]?.value)/1000) : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -926,21 +936,21 @@ export default class CorporateAnnualTarget extends Component { ...@@ -926,21 +936,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(fixNumber(Number(i[13].value), 1)) : String(i[13]), "january": i[13].formula != undefined ? String((Number(i[13]?.formula[0].value))/1000) : String(i[13]),
"february": i[14].value != undefined ? String(fixNumber(Number(i[14].value), 1)) : String(i[14]), "february": i[14].formula != undefined ? String((Number(i[14]?.formula[0].value))/1000) : String(i[14]),
"march": i[15].value != undefined ? String(fixNumber(Number(i[15].value), 1)) : String(i[15]), "march": i[15].formula != undefined ? String((Number(i[15]?.formula[0].value))/1000) : String(i[15]),
"april": i[16].value != undefined ? String(fixNumber(Number(i[16].value), 1)) : String(i[16]), "april": i[16].formula != undefined ? String((Number(i[16]?.formula[0].value))/1000) : String(i[16]),
"may": i[17].value != undefined ? String(fixNumber(Number(i[17].value), 1)) : String(i[17]), "may": i[17].formula != undefined ? String((Number(i[17]?.formula[0].value))/1000) : String(i[17]),
"june": i[18].value != undefined ? String(fixNumber(Number(i[18].value), 1)) : String(i[18]), "june": i[18].formula != undefined ? String((Number(i[18]?.formula[0].value))/1000) : String(i[18]),
"july": i[19].value != undefined ? String(fixNumber(Number(i[19].value), 1)) : String(i[19]), "july": i[19].formula != undefined ? String((Number(i[19]?.formula[0].value))/1000) : String(i[19]),
"august": i[20].value != undefined ? String(fixNumber(Number(i[20].value), 1)) : String(i[20]), "august": i[20].formula != undefined ? String((Number(i[20]?.formula[0].value))/1000) : String(i[20]),
"september": i[21].value != undefined ? String(fixNumber(Number(i[21].value), 1)) : String(i[21]), "september": i[21].formula != undefined ? String((Number(i[21]?.formula[0].value))/1000) : String(i[21]),
"october": i[22].value != undefined ? String(fixNumber(Number(i[22].value), 1)) : String(i[22]), "october": i[22].formula != undefined ? String((Number(i[22]?.formula[0].value))/1000) : String(i[22]),
"november": i[23].value != undefined ? String(fixNumber(Number(i[23].value), 1)) : String(i[23]), "november": i[23].formula != undefined ? String((Number(i[23]?.formula[0].value))/1000) : String(i[23]),
"december": i[24].value != undefined ? String(fixNumber(Number(i[24].value), 1)) : String(i[24]), "december": i[24].formula != undefined ? String((Number(i[24]?.formula[1].value))/1000) : String(i[24]),
"total_current_year": String(fixNumber(Number(i[25]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[25]), 1)), "total_current_year": String(Number(i[30])) == "" ? "0.0" : String(Number(i[30].length)) > 0 ? String(Number(i[30][2]?.value)/1000) : String(i[25]),
"total_next_year": String(fixNumber(Number(i[26]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[26]), 1)), "total_next_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][0]?.value)/1000) : String(i[26]),
"total_more_year": String(fixNumber(Number(i[27]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[27]), 1)), "total_more_year": String(Number(i[30])) == "" ? "0.0" : (Number(i[30].length)) > 0 ? String(Number(i[30][1]?.value)/1000) : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -2018,7 +2028,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2018,7 +2028,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 0)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 0)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 0)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 0)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2039,7 +2049,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2039,7 +2049,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2103,7 +2113,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2103,7 +2113,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2128,7 +2138,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2128,7 +2138,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 1)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2149,7 +2159,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2149,7 +2159,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2213,7 +2223,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2213,7 +2223,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2238,7 +2248,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2238,7 +2248,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 2)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2259,7 +2269,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2259,7 +2269,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2323,7 +2333,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2323,7 +2333,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2348,7 +2358,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2348,7 +2358,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 3)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2369,7 +2379,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2369,7 +2379,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2434,7 +2444,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2434,7 +2444,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2459,7 +2469,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2459,7 +2469,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2480,7 +2490,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2480,7 +2490,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2545,7 +2555,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2545,7 +2555,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2570,7 +2580,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2570,7 +2580,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2591,7 +2601,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2591,7 +2601,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2656,7 +2666,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2656,7 +2666,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2681,7 +2691,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2681,7 +2691,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2702,7 +2712,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2702,7 +2712,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2767,7 +2777,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2767,7 +2777,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2792,7 +2802,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2792,7 +2802,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2813,7 +2823,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2813,7 +2823,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2878,7 +2888,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2878,7 +2888,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2903,7 +2913,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2903,7 +2913,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2924,7 +2934,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2924,7 +2934,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -2989,7 +2999,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2989,7 +2999,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3014,7 +3024,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3014,7 +3024,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3035,7 +3045,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3035,7 +3045,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3100,7 +3110,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3100,7 +3110,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3125,7 +3135,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3125,7 +3135,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3146,7 +3156,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3146,7 +3156,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3211,7 +3221,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3211,7 +3221,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3236,7 +3246,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3236,7 +3246,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3257,7 +3267,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3257,7 +3267,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3322,7 +3332,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3322,7 +3332,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3347,7 +3357,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3347,7 +3357,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3368,7 +3378,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3368,7 +3378,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3434,7 +3444,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3434,7 +3444,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueForecast(value, tableMeta, this.props.periode)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueForecast(value, tableMeta, this.props.periode)), 1)} value={fixNumber(Number(handleValueForecast(value, tableMeta, this.props.periode)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueForecast(value, tableMeta, this.props.periode)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3459,7 +3469,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3459,7 +3469,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 13)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 13)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 13)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 13)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3480,7 +3490,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3480,7 +3490,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleTotal(tableMeta)), 1) == 0 ? "0.0" : fixNumber(Number(handleTotal(tableMeta)), 1)} value={fixNumber(Number(handleTotal(tableMeta)), 2) == 0 ? "0.00" : fixNumber(Number(handleTotal(tableMeta)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3545,7 +3555,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3545,7 +3555,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 1)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 1)), 1)} value={fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 1)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 1)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3570,7 +3580,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3570,7 +3580,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 14)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 14)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 14)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 14)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3591,7 +3601,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3591,7 +3601,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: '#5198ea', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: '#5198ea', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={false} disabled={false}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3656,7 +3666,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3656,7 +3666,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 2)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 2)), 1)} value={fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 2)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueForecast(value, tableMeta, Number(this.props.periode) + 2)), 2)}
disabled={true} disabled={true}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3681,7 +3691,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3681,7 +3691,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(handleValueFormula(value, tableMeta, 16)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(value, tableMeta, 16)), 1)} value={fixNumber(Number(handleValueFormula(value, tableMeta, 16)), 2) == 0 ? "0.00" : fixNumber(Number(handleValueFormula(value, tableMeta, 16)), 2)}
disabled disabled
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
...@@ -3702,7 +3712,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3702,7 +3712,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: '#5198ea', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: '#5198ea', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
disabled={false} disabled={false}
//decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} //decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
onBlur={(event) => { onBlur={(event) => {
......
...@@ -505,8 +505,8 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -505,8 +505,8 @@ export default class CorporateAnnualTargetMR extends Component {
jenis_kpi: i[8] == null ? "" : i[8], jenis_kpi: i[8] == null ? "" : i[8],
max_ach: i[9] == null ? "" : i[9], max_ach: i[9] == null ? "" : i[9],
formula_ytd: i[10] == null ? "" : i[10], formula_ytd: i[10] == null ? "" : i[10],
actual_monthly: String(fixNumber(Number(i[11]), 1)), actual_monthly: String(Number(i[11])),
target_monthly: String(fixNumber(Number(i[12]), 1)), target_monthly: String(Number(i[12])),
achivement_monthly: String(fixNumber(Number(i[13]), 1)), achivement_monthly: String(fixNumber(Number(i[13]), 1)),
score: String(fixNumber(Number(i[14]), 0)), score: String(fixNumber(Number(i[14]), 0)),
score_x_weight: String(fixNumber(Number(i[15]), 2)), score_x_weight: String(fixNumber(Number(i[15]), 2)),
...@@ -681,8 +681,8 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -681,8 +681,8 @@ export default class CorporateAnnualTargetMR extends Component {
"jenis_kpi": i[8] == null ? "" : i[8], "jenis_kpi": i[8] == null ? "" : i[8],
"max_ach": i[9] == null ? "" : i[9], "max_ach": i[9] == null ? "" : i[9],
"formula_ytd": i[10] == null ? "" : i[10], "formula_ytd": i[10] == null ? "" : i[10],
"actual_monthly": i[11] == null || i[11] == "" ? 0.0 : String(fixNumber(Number(i[11]), 1)), "actual_monthly": i[11] == null || i[11] == "" ? 0.0 : String(Number(i[11])),
"target_monthly": i[12] == null || i[12] == "" ? 0.0 : String(fixNumber(Number(i[12]), 1)), "target_monthly": i[12] == null || i[12] == "" ? 0.0 : String(Number(i[12])),
"achivement_monthly": String(fixNumber(Number(i[13]), 1)), "achivement_monthly": String(fixNumber(Number(i[13]), 1)),
"score": String(fixNumber(Number(i[14]), 0)), "score": String(fixNumber(Number(i[14]), 0)),
"score_x_weight": String(fixNumber(Number(i[15]), 2)), "score_x_weight": String(fixNumber(Number(i[15]), 2)),
...@@ -1745,26 +1745,26 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1745,26 +1745,26 @@ export default class CorporateAnnualTargetMR extends Component {
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={true} disabled={true}
decimalScale={1} decimalScale={2}
/> />
: :
<div style={{ flex: 1, textAlign: 'right' }}> <div style={{ flex: 1, textAlign: 'right' }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value)}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: this.state.get_for == 'view' ? "black" : handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) ? "#5198ea" : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.state.get_for == 'view' ? "black" : handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) ? "#5198ea" : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.00" : Number(value))}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={this.state.get_for == 'view' ? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)} disabled={this.state.get_for == 'view' ? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)}
decimalScale={1} decimalScale={2}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1792,17 +1792,29 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1792,17 +1792,29 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ width: 75, textAlign: 'right' }}> <div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={true}
decimalScale={2}
/>
:
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? Number(value) == 0 ? "0.00" : fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
decimalScale={1} decimalScale={2}
disabled={true} disabled={true}
/> />
} }
......
...@@ -404,18 +404,18 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -404,18 +404,18 @@ export default class CorporateAnnualTargetRO extends Component {
"kpi_type": i[8] == null ? "" : i[8].value, "kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value, "max_ach": i[9] == null ? "" : i[9].value,
"formula": i[10] == null ? "" : i[10].value, "formula": i[10] == null ? "" : i[10].value,
"january": stateFR ? i[0] == 3 ? String(i[11]) : String(Number(i[11].value)) : String(i[11]), "january": stateFR ? i[0] == 3 ? String(i[11]) :(i[5] == "ROIC" ? String(i[11].value): String(Number(i[11]?.formula[0].value)/1000)) : String(i[11]),
"february": stateFR ? i[0] == 3 ? String(i[12]) : String(Number(i[12].value)) : String(i[12]), "february": stateFR ? i[0] == 3 ? String(i[12]) : (i[5] == "ROIC" ? String(i[12].value): String(Number(i[12]?.formula[0].value)/1000)) : String(i[12]),
"march": stateFR ? i[0] == 3 ? String(i[13]) : String(Number(i[13].value)) : String(i[13]), "march": stateFR ? i[0] == 3 ? String(i[13]) : (i[5] == "ROIC" ? String(i[13].value): String(Number(i[13]?.formula[0].value)/1000)) : String(i[13]),
"april": stateFR ? i[0] == 3 ? String(i[14]) : String(Number(i[14].value)) : String(i[14]), "april": stateFR ? i[0] == 3 ? String(i[14]) : (i[5] == "ROIC" ? String(i[14].value): String(Number(i[14]?.formula[0].value)/1000)) : String(i[14]),
"may": stateFR ? i[0] == 3 ? String(i[15]) : String(Number(i[15].value)) : String(i[15]), "may": stateFR ? i[0] == 3 ? String(i[15]) : (i[5] == "ROIC" ? String(i[15].value): String(Number(i[15]?.formula[0].value)/1000)) : String(i[15]),
"june": stateFR ? i[0] == 3 ? String(i[16]) : String(Number(i[16].value)) : String(i[16]), "june": stateFR ? i[0] == 3 ? String(i[16]) : (i[5] == "ROIC" ? String(i[16].value): String(Number(i[16]?.formula[0].value)/1000)) : String(i[16]),
"july": stateFR ? i[0] == 3 ? String(i[17]) : String(Number(i[17].value)) : String(i[17]), "july": stateFR ? i[0] == 3 ? String(i[17]) : (i[5] == "ROIC" ? String(i[17].value): String(Number(i[17]?.formula[0].value)/1000)) : String(i[17]),
"august": stateFR ? i[0] == 3 ? String(i[18]) : String(Number(i[18].value)) : String(i[18]), "august": stateFR ? i[0] == 3 ? String(i[18]) : (i[5] == "ROIC" ? String(i[18].value): String(Number(i[18]?.formula[0].value)/1000)) : String(i[18]),
"september": stateFR ? i[0] == 3 ? String(i[19]) : String(Number(i[19].value)) : String(i[19]), "september": stateFR ? i[0] == 3 ? String(i[19]) : (i[5] == "ROIC" ? String(i[19].value): String(Number(i[19]?.formula[0].value)/1000)) : String(i[19]),
"october": stateFR ? i[0] == 3 ? String(i[20]) : String(Number(i[20].value)) : String(i[20]), "october": stateFR ? i[0] == 3 ? String(i[20]) : (i[5] == "ROIC" ? String(i[20].value): String(Number(i[20]?.formula[0].value)/1000)) : String(i[20]),
"november": stateFR ? i[0] == 3 ? String(i[21]) : String(Number(i[21].value)) : String(i[21]), "november": stateFR ? i[0] == 3 ? String(i[21]) : (i[5] == "ROIC" ? String(i[21].value): String(Number(i[21]?.formula[0].value)/1000)) : String(i[21]),
"december": stateFR ? i[0] == 3 ? String(i[22]) : String(Number(i[22].value)) : String(i[22]), "december": stateFR ? i[0] == 3 ? String(i[22]) : (i[5] == "ROIC" ? String(i[22].value): String(Number(i[22]?.formula[1].value)/1000)) : String(i[22]),
"total_current_year": String(Number(i[23])) == "" ? "0.0" : String(Number(i[23])), "total_current_year": String(Number(i[23])) == "" ? "0.0" : String(Number(i[23])),
"strategic": String(i[24]), "strategic": String(i[24]),
"pic": String(i[25]) "pic": String(i[25])
...@@ -430,19 +430,19 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -430,19 +430,19 @@ export default class CorporateAnnualTargetRO extends Component {
"kpi_type": i[8] == null ? "" : i[8].value, "kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value, "max_ach": i[9] == null ? "" : i[9].value,
"formula": i[10] == null ? "" : i[10].value, "formula": i[10] == null ? "" : i[10].value,
"january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]), "january": stateFR ? i[0] == 3 ? String(i[11]) :(i[5] == "ROIC" ? String(i[11].value): String(Number(i[11]?.formula[0].value)/1000)) : String(i[11]),
"february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]), "february": stateFR ? i[0] == 3 ? String(i[12]) : (i[5] == "ROIC" ? String(i[12].value): String(Number(i[12]?.formula[0].value)/1000)) : String(i[12]),
"march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]), "march": stateFR ? i[0] == 3 ? String(i[13]) : (i[5] == "ROIC" ? String(i[13].value): String(Number(i[13]?.formula[0].value)/1000)) : String(i[13]),
"april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]), "april": stateFR ? i[0] == 3 ? String(i[14]) : (i[5] == "ROIC" ? String(i[14].value): String(Number(i[14]?.formula[0].value)/1000)) : String(i[14]),
"may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]), "may": stateFR ? i[0] == 3 ? String(i[15]) : (i[5] == "ROIC" ? String(i[15].value): String(Number(i[15]?.formula[0].value)/1000)) : String(i[15]),
"june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]), "june": stateFR ? i[0] == 3 ? String(i[16]) : (i[5] == "ROIC" ? String(i[16].value): String(Number(i[16]?.formula[0].value)/1000)) : String(i[16]),
"july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]), "july": stateFR ? i[0] == 3 ? String(i[17]) : (i[5] == "ROIC" ? String(i[17].value): String(Number(i[17]?.formula[0].value)/1000)) : String(i[17]),
"august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]), "august": stateFR ? i[0] == 3 ? String(i[18]) : (i[5] == "ROIC" ? String(i[18].value): String(Number(i[18]?.formula[0].value)/1000)) : String(i[18]),
"september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]), "september": stateFR ? i[0] == 3 ? String(i[19]) : (i[5] == "ROIC" ? String(i[19].value): String(Number(i[19]?.formula[0].value)/1000)) : String(i[19]),
"october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]), "october": stateFR ? i[0] == 3 ? String(i[20]) : (i[5] == "ROIC" ? String(i[20].value): String(Number(i[20]?.formula[0].value)/1000)) : String(i[20]),
"november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]), "november": stateFR ? i[0] == 3 ? String(i[21]) : (i[5] == "ROIC" ? String(i[21].value): String(Number(i[21]?.formula[0].value)/1000)) : String(i[21]),
"december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]), "december": stateFR ? i[0] == 3 ? String(i[22]) : (i[5] == "ROIC" ? String(i[22].value): String(Number(i[22]?.formula[1].value)/1000)) : String(i[22]),
"total_current_year": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)), "total_current_year": String(Number(i[23])) == "" ? "0.0" : String(Number(i[23])),
"strategic": String(i[24]), "strategic": String(i[24]),
"pic": String(i[25]) "pic": String(i[25])
}) })
...@@ -662,7 +662,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -662,7 +662,10 @@ export default class CorporateAnnualTargetRO extends Component {
stateFR = false stateFR = false
} }
if (this.state.defaultCurrencyUpload?.id == 2) { if (String(i[5]) == 'revenue'){
console.log(String(Number(i[22]?.formula[1].value)/1000))
}
// if (this.state.defaultCurrencyUpload?.id == 2) {
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_report": String(i[5]), "item_report": String(i[5]),
...@@ -671,48 +674,48 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -671,48 +674,48 @@ export default class CorporateAnnualTargetRO extends Component {
"kpi_type": i[8] == null ? "" : i[8].value, "kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value, "max_ach": i[9] == null ? "" : i[9].value,
"formula_ytd": i[10] == null ? "" : i[10].value, "formula_ytd": i[10] == null ? "" : i[10].value,
"january": stateFR ? i[0] == 3 ? String(i[11]) : String(Number(i[11].value)) : String(i[11]), "january": stateFR ? i[0] == 3 ? String(i[11]) :(i[5] == "ROIC" ? String(i[11].value): String(Number(i[11]?.formula[0].value)/1000)) : String(i[11]),
"february": stateFR ? i[0] == 3 ? String(i[12]) : String(Number(i[12].value)) : String(i[12]), "february": stateFR ? i[0] == 3 ? String(i[12]) : (i[5] == "ROIC" ? String(i[12].value): String(Number(i[12]?.formula[0].value)/1000)) : String(i[12]),
"march": stateFR ? i[0] == 3 ? String(i[13]) : String(Number(i[13].value)) : String(i[13]), "march": stateFR ? i[0] == 3 ? String(i[13]) : (i[5] == "ROIC" ? String(i[13].value): String(Number(i[13]?.formula[0].value)/1000)) : String(i[13]),
"april": stateFR ? i[0] == 3 ? String(i[14]) : String(Number(i[14].value)) : String(i[14]), "april": stateFR ? i[0] == 3 ? String(i[14]) : (i[5] == "ROIC" ? String(i[14].value): String(Number(i[14]?.formula[0].value)/1000)) : String(i[14]),
"may": stateFR ? i[0] == 3 ? String(i[15]) : String(Number(i[15].value)) : String(i[15]), "may": stateFR ? i[0] == 3 ? String(i[15]) : (i[5] == "ROIC" ? String(i[15].value): String(Number(i[15]?.formula[0].value)/1000)) : String(i[15]),
"june": stateFR ? i[0] == 3 ? String(i[16]) : String(Number(i[16].value)) : String(i[16]), "june": stateFR ? i[0] == 3 ? String(i[16]) : (i[5] == "ROIC" ? String(i[16].value): String(Number(i[16]?.formula[0].value)/1000)) : String(i[16]),
"july": stateFR ? i[0] == 3 ? String(i[17]) : String(Number(i[17].value)) : String(i[17]), "july": stateFR ? i[0] == 3 ? String(i[17]) : (i[5] == "ROIC" ? String(i[17].value): String(Number(i[17]?.formula[0].value)/1000)) : String(i[17]),
"august": stateFR ? i[0] == 3 ? String(i[18]) : String(Number(i[18].value)) : String(i[18]), "august": stateFR ? i[0] == 3 ? String(i[18]) : (i[5] == "ROIC" ? String(i[18].value): String(Number(i[18]?.formula[0].value)/1000)) : String(i[18]),
"september": stateFR ? i[0] == 3 ? String(i[19]) : String(Number(i[19].value)) : String(i[19]), "september": stateFR ? i[0] == 3 ? String(i[19]) : (i[5] == "ROIC" ? String(i[19].value): String(Number(i[19]?.formula[0].value)/1000)) : String(i[19]),
"october": stateFR ? i[0] == 3 ? String(i[20]) : String(Number(i[20].value)) : String(i[20]), "october": stateFR ? i[0] == 3 ? String(i[20]) : (i[5] == "ROIC" ? String(i[20].value): String(Number(i[20]?.formula[0].value)/1000)) : String(i[20]),
"november": stateFR ? i[0] == 3 ? String(i[21]) : String(Number(i[21].value)) : String(i[21]), "november": stateFR ? i[0] == 3 ? String(i[21]) : (i[5] == "ROIC" ? String(i[21].value): String(Number(i[21]?.formula[0].value)/1000)) : String(i[21]),
"december": stateFR ? i[0] == 3 ? String(i[22]) : String(Number(i[22].value)) : String(i[22]), "december": stateFR ? i[0] == 3 ? String(i[22]) : (i[5] == "ROIC" ? String(i[22].value): String(Number(i[22]?.formula[1].value)/1000)) : String(i[22]),
"total_current_year": String(Number(i[23])) == "" ? "0.0" : String(Number(i[23])), "total_current_year": String(Number(i[23])) == "" ? "0.0" : String(Number(i[23])),
"strategic": i[24] == null ? "" : String(i[24]), "strategic": i[24] == null ? "" : String(i[24]),
"pic": String(i[25]) "pic": String(i[25])
}) })
} else { // } else {
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_report": String(i[5]), // "item_report": String(i[5]),
"weight": String(i[6]), // "weight": String(i[6]),
"uom": String(i[7]), // "uom": String(i[7]),
"kpi_type": i[8] == null ? "" : i[8].value, // "kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value, // "max_ach": i[9] == null ? "" : i[9].value,
"formula_ytd": i[10] == null ? "" : i[10].value, // "formula_ytd": i[10] == null ? "" : i[10].value,
"january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]), // "january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]),
"february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]), // "february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]),
"march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]), // "march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]),
"april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]), // "april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]),
"may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]), // "may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]),
"june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]), // "june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]),
"july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]), // "july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]),
"august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]), // "august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]),
"september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]), // "september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]),
"october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]), // "october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]),
"november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]), // "november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]),
"december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]), // "december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]),
"total_current_year": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)), // "total_current_year": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)),
"strategic": i[24] == null ? "" : String(i[24]), // "strategic": i[24] == null ? "" : String(i[24]),
"pic": String(i[25]) // "pic": String(i[25])
}) // })
} // }
}) })
...@@ -1467,7 +1470,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1467,7 +1470,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1494,7 +1497,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1494,7 +1497,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1521,7 +1524,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1521,7 +1524,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1549,7 +1552,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1549,7 +1552,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1558,7 +1561,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1558,7 +1561,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1586,7 +1589,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1586,7 +1589,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1595,7 +1598,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1595,7 +1598,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1623,7 +1626,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1623,7 +1626,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1632,7 +1635,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1632,7 +1635,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1660,7 +1663,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1660,7 +1663,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1669,7 +1672,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1669,7 +1672,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1697,7 +1700,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1697,7 +1700,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1706,7 +1709,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1706,7 +1709,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1734,7 +1737,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1734,7 +1737,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1743,7 +1746,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1743,7 +1746,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1771,7 +1774,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1771,7 +1774,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1780,7 +1783,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1780,7 +1783,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.0" : Number(value.value)) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : Number(value.value)) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1808,7 +1811,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1808,7 +1811,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1822,9 +1825,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1822,9 +1825,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 11))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 11))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1846,10 +1849,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1846,10 +1849,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 11))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 11))}
// value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1868,9 +1871,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1868,9 +1871,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={false} disabled={false}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1908,7 +1911,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1908,7 +1911,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1922,9 +1925,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1922,9 +1925,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 12))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 12))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1946,10 +1949,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1946,10 +1949,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 12))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 12))}
// value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1968,9 +1971,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1968,9 +1971,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={false} disabled={false}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2008,7 +2011,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2008,7 +2011,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={fixNumber(Number(value), 1)} value={fixNumber(Number(value), 2)}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -2022,9 +2025,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2022,9 +2025,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 1) : Number(handleTotal(tableMeta)) == 0 ? "0.0" : Number(handleTotal(tableMeta))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 2) : Number(handleTotal(tableMeta)) == 0 ? "0.00" : Number(handleTotal(tableMeta))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2048,9 +2051,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2048,9 +2051,9 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// value={Number(handleValueFormula(value, tableMeta, 13)).toFixed(1)} // value={Number(handleValueFormula(value, tableMeta, 13)).toFixed(1)}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled disabled
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2069,9 +2072,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2069,9 +2072,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 1) : Number(handleTotal(tableMeta)) == 0 ? "0.0" : Number(handleTotal(tableMeta))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 2) : Number(handleTotal(tableMeta)) == 0 ? "0.00" : Number(handleTotal(tableMeta))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
......
...@@ -398,7 +398,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -398,7 +398,7 @@ export default class CorporateAnnualTargetRO extends Component {
stateFR = false stateFR = false
} }
// 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({
"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[5]), "item_name": String(i[5]),
...@@ -424,33 +424,33 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -424,33 +424,33 @@ export default class CorporateAnnualTargetRO extends Component {
"strategic_initiative": String(i[24]), "strategic_initiative": String(i[24]),
"pic": String(i[25]) "pic": String(i[25])
}) })
} else { // } else {
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[5]), // "item_name": String(i[5]),
"parent": i[2] == "" ? null : i[2], // "parent": i[2] == "" ? null : i[2],
"weight": String(i[6]), // "weight": String(i[6]),
"uom": String(i[7]), // "uom": String(i[7]),
"kpi_type": i[8] == null ? "" : i[8].value, // "kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value, // "max_ach": i[9] == null ? "" : i[9].value,
"formula_ytd": i[10] == null ? "" : i[10].value, // "formula_ytd": i[10] == null ? "" : i[10].value,
"january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]), // "january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]),
"february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]), // "february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]),
"march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]), // "march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]),
"april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]), // "april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]),
"may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]), // "may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]),
"june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]), // "june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]),
"july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]), // "july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]),
"august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]), // "august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]),
"september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]), // "september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]),
"october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]), // "october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]),
"november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]), // "november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]),
"december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]), // "december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]),
"current_year_total": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)), // "current_year_total": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)),
"strategic_initiative": String(i[24]), // "strategic_initiative": String(i[24]),
"pic": String(i[25]) // "pic": String(i[25])
}) // })
} // }
}) })
// console.log(JSON.stringify(data)) // console.log(JSON.stringify(data))
...@@ -523,18 +523,18 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -523,18 +523,18 @@ export default class CorporateAnnualTargetRO extends Component {
uom: i[4] === undefined ? "" : String(i[4]).trim(), uom: i[4] === undefined ? "" : String(i[4]).trim(),
kpi_type: i[5] === undefined ? "" : String(i[5]).trim(), kpi_type: i[5] === undefined ? "" : String(i[5]).trim(),
max_ach: i[6] === undefined ? "" : String(i[6]).toLocaleLowerCase() !== 'unlimited' ? (String(i[6]).includes('%') ? String(i[6].trim()) : String(Number(i[6] * 100) + '%')) : String(i[6]).trim(), max_ach: i[6] === undefined ? "" : String(i[6]).toLocaleLowerCase() !== 'unlimited' ? (String(i[6]).includes('%') ? String(i[6].trim()) : String(Number(i[6] * 100) + '%')) : String(i[6]).trim(),
january: i[7] === undefined ? "0.0" : reg.test(String(i[7])) === false ? "0.0" : String(roundMath(Number(i[7]), 1)).trim(), january: i[7] === undefined ? "0.0" : reg.test(String(i[7])) === false ? "0.0" : String(i[7]).trim(),
february: i[8] === undefined ? "0.0" : reg.test(String(i[8])) === false ? "0.0" : String(roundMath(Number(i[8]), 1)).trim(), february: i[8] === undefined ? "0.0" : reg.test(String(i[8])) === false ? "0.0" : String(i[8]).trim(),
march: i[9] === undefined ? "0.0" : reg.test(String(i[9])) === false ? "0.0" : String(roundMath(Number(i[9]), 1)).trim(), march: i[9] === undefined ? "0.0" : reg.test(String(i[9])) === false ? "0.0" : String(i[9]).trim(),
april: i[10] === undefined ? "0.0" : reg.test(String(i[10])) === false ? "0.0" : String(roundMath(Number(i[10]), 1)).trim(), april: i[10] === undefined ? "0.0" : reg.test(String(i[10])) === false ? "0.0" : String(i[10]).trim(),
may: i[11] === undefined ? "0.0" : reg.test(String(i[11])) === false ? "0.0" : String(roundMath(Number(i[11]), 1)).trim(), may: i[11] === undefined ? "0.0" : reg.test(String(i[11])) === false ? "0.0" : String(i[11]).trim(),
june: i[12] === undefined ? "0.0" : reg.test(String(i[12])) === false ? "0.0" : String(roundMath(Number(i[12]), 1)).trim(), june: i[12] === undefined ? "0.0" : reg.test(String(i[12])) === false ? "0.0" : String(i[12]).trim(),
july: i[13] === undefined ? "0.0" : reg.test(String(i[13])) === false ? "0.0" : String(roundMath(Number(i[13]), 1)).trim(), july: i[13] === undefined ? "0.0" : reg.test(String(i[13])) === false ? "0.0" : String(i[13]).trim(),
august: i[14] === undefined ? "0.0" : reg.test(String(i[14])) === false ? "0.0" : String(roundMath(Number(i[14]), 1)).trim(), august: i[14] === undefined ? "0.0" : reg.test(String(i[14])) === false ? "0.0" : String(i[14]).trim(),
september: i[15] === undefined ? "0.0" : reg.test(String(i[15])) === false ? "0.0" : String(roundMath(Number(i[15]), 1)).trim(), september: i[15] === undefined ? "0.0" : reg.test(String(i[15])) === false ? "0.0" : String(i[15]).trim(),
october: i[16] === undefined ? "0.0" : reg.test(String(i[16])) === false ? "0.0" : String(roundMath(Number(i[16]), 1)).trim(), october: i[16] === undefined ? "0.0" : reg.test(String(i[16])) === false ? "0.0" : String(i[16]).trim(),
november: i[17] === undefined ? "0.0" : reg.test(String(i[17])) === false ? "0.0" : String(roundMath(Number(i[17]), 1)).trim(), november: i[17] === undefined ? "0.0" : reg.test(String(i[17])) === false ? "0.0" : String(i[17]).trim(),
december: i[18] === undefined ? "0.0" : reg.test(String(i[18])) === false ? "0.0" : String(roundMath(Number(i[18]), 1)).trim(), december: i[18] === undefined ? "0.0" : reg.test(String(i[18])) === false ? "0.0" : String(i[18]).trim(),
strategic_initiative: i[20] === undefined ? "" : String(i[20]).trim(), strategic_initiative: i[20] === undefined ? "" : String(i[20]).trim(),
pic: i[21] === undefined ? "" : String(i[21]).trim() pic: i[21] === undefined ? "" : String(i[21]).trim()
}) })
...@@ -650,7 +650,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -650,7 +650,7 @@ export default class CorporateAnnualTargetRO extends Component {
stateFR = false stateFR = false
} }
if (this.state.defaultCurrencyUpload?.id == 2) { // if (this.state.defaultCurrencyUpload?.id == 2) {
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_report": String(i[5]), "item_report": String(i[5]),
...@@ -675,32 +675,32 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -675,32 +675,32 @@ export default class CorporateAnnualTargetRO extends Component {
"strategic": String(i[24]), "strategic": String(i[24]),
"pic": String(i[25]) "pic": String(i[25])
}) })
} else { // } else {
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_report": String(i[5]), // "item_report": String(i[5]),
"weight": String(i[6]), // "weight": String(i[6]),
"uom": String(i[7]), // "uom": String(i[7]),
"kpi_type": i[8] == null ? "" : i[8].value, // "kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value, // "max_ach": i[9] == null ? "" : i[9].value,
"formula_ytd": i[10] == null ? "" : i[10].value, // "formula_ytd": i[10] == null ? "" : i[10].value,
"january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]), // "january": stateFR ? i[0] == 3 ? String(i[11]) : String(fixNumber(Number(i[11].value), 1)) : String(i[11]),
"february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]), // "february": stateFR ? i[0] == 3 ? String(i[12]) : String(fixNumber(Number(i[12].value), 1)) : String(i[12]),
"march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]), // "march": stateFR ? i[0] == 3 ? String(i[13]) : String(fixNumber(Number(i[13].value), 1)) : String(i[13]),
"april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]), // "april": stateFR ? i[0] == 3 ? String(i[14]) : String(fixNumber(Number(i[14].value), 1)) : String(i[14]),
"may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]), // "may": stateFR ? i[0] == 3 ? String(i[15]) : String(fixNumber(Number(i[15].value), 1)) : String(i[15]),
"june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]), // "june": stateFR ? i[0] == 3 ? String(i[16]) : String(fixNumber(Number(i[16].value), 1)) : String(i[16]),
"july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]), // "july": stateFR ? i[0] == 3 ? String(i[17]) : String(fixNumber(Number(i[17].value), 1)) : String(i[17]),
"august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]), // "august": stateFR ? i[0] == 3 ? String(i[18]) : String(fixNumber(Number(i[18].value), 1)) : String(i[18]),
"september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]), // "september": stateFR ? i[0] == 3 ? String(i[19]) : String(fixNumber(Number(i[19].value), 1)) : String(i[19]),
"october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]), // "october": stateFR ? i[0] == 3 ? String(i[20]) : String(fixNumber(Number(i[20].value), 1)) : String(i[20]),
"november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]), // "november": stateFR ? i[0] == 3 ? String(i[21]) : String(fixNumber(Number(i[21].value), 1)) : String(i[21]),
"december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]), // "december": stateFR ? i[0] == 3 ? String(i[22]) : String(fixNumber(Number(i[22].value), 1)) : String(i[22]),
"current_year_total": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)), // "current_year_total": String(fixNumber(Number(i[23]), 1)) == "" ? "0.0" : String(fixNumber(Number(i[23]), 1)),
"strategic": String(i[24]), // "strategic": String(i[24]),
"pic": String(i[25]) // "pic": String(i[25])
}) // })
} // }
}) })
let payload = { let payload = {
...@@ -1440,13 +1440,22 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1440,13 +1440,22 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : fixNumber(Number(value.value), 2)): (fixNumber(Number(value),2) == 0 ? "0.00" : fixNumber(Number(value),2))): (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : fixNumber(Number(value.value),2)) : (fixNumber(Number(value),2) == 0 ? "0.00" : fixNumber(Number(value),2)))}
/> :
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.0" : Number(value.value) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.00" : Number(value.value) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1467,13 +1476,22 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1467,13 +1476,22 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == 'view' ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.0" : Number(value.value) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : fixNumber(Number(value.value), 2)): (fixNumber(Number(value),2) == 0 ? "0.00" : fixNumber(Number(value),2))): (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : fixNumber(Number(value.value),2)) : (fixNumber(Number(value),2) == 0 ? "0.00" : fixNumber(Number(value),2)))}
/> :
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.00" : Number(value.value) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1494,13 +1512,22 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1494,13 +1512,22 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : fixNumber(Number(value.value), 2)): (fixNumber(Number(value),2) == 0 ? "0.00" : fixNumber(Number(value),2))): (tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00" : fixNumber(Number(value.value),2)) : (fixNumber(Number(value),2) == 0 ? "0.00" : fixNumber(Number(value),2)))}
/>:
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.0" : Number(value.value) : Number(value) == 0 ? "0.0" : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.00" : Number(value.value) : Number(value) == 0 ? "0.00" : Number(value))}
/> />
} }
</div> </div>
...@@ -1528,7 +1555,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1528,7 +1555,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={(tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1))} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1542,9 +1569,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1542,9 +1569,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 1) : Number(handleValueFormula(value, tableMeta, 4)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 4))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 2) : Number(handleValueFormula(value, tableMeta, 4)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 4))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1566,10 +1593,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1566,10 +1593,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 1) : Number(handleValueFormula(value, tableMeta, 4)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 4))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 4)), 2) : Number(handleValueFormula(value, tableMeta, 4)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 4))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1588,9 +1615,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1588,9 +1615,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.quarter == 'q1' ? false : true} disabled={this.props.quarter == 'q1' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1628,7 +1655,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1628,7 +1655,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1642,9 +1669,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1642,9 +1669,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 1) : Number(handleValueFormula(value, tableMeta, 5)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 5))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 2) : Number(handleValueFormula(value, tableMeta, 5)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 5))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1666,10 +1693,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1666,10 +1693,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 1) : Number(handleValueFormula(value, tableMeta, 5)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 5))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 5)), 2) : Number(handleValueFormula(value, tableMeta, 5)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 5))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1688,9 +1715,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1688,9 +1715,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.quarter == 'q1' ? false : true} disabled={this.props.quarter == 'q1' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1728,7 +1755,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1728,7 +1755,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1742,9 +1769,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1742,9 +1769,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 1) : Number(handleValueFormula(value, tableMeta, 6)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 6))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 2) : Number(handleValueFormula(value, tableMeta, 6)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 6))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1766,10 +1793,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1766,10 +1793,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 1) : Number(handleValueFormula(value, tableMeta, 6)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 6))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 6)), 2) : Number(handleValueFormula(value, tableMeta, 6)) == 0 ? "0.000" : Number(handleValueFormula(value, tableMeta, 6))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1788,9 +1815,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1788,9 +1815,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.quarter == 'q1' ? false : true} disabled={this.props.quarter == 'q1' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 2 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1828,7 +1855,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1828,7 +1855,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1842,9 +1869,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1842,9 +1869,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 1) : Number(handleValueFormula(value, tableMeta, 7)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 7))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 2) : Number(handleValueFormula(value, tableMeta, 7)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 7))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2: 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1866,10 +1893,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1866,10 +1893,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 1) : Number(handleValueFormula(value, tableMeta, 7)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 7))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 7)), 2) : Number(handleValueFormula(value, tableMeta, 7)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 7))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1888,9 +1915,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1888,9 +1915,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1928,7 +1955,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1928,7 +1955,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -1942,9 +1969,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1942,9 +1969,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 1) : Number(handleValueFormula(value, tableMeta, 8)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 8))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 2) : Number(handleValueFormula(value, tableMeta, 8)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 8))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1966,10 +1993,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1966,10 +1993,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 1) : Number(handleValueFormula(value, tableMeta, 8)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 8))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 8)), 2) : Number(handleValueFormula(value, tableMeta, 8)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 8))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1988,9 +2015,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1988,9 +2015,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2028,7 +2055,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2028,7 +2055,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -2042,9 +2069,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2042,9 +2069,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 1) : Number(handleValueFormula(value, tableMeta, 9)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 9))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 2) : Number(handleValueFormula(value, tableMeta, 9)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 9))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2066,10 +2093,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2066,10 +2093,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 1) : Number(handleValueFormula(value, tableMeta, 9)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 9))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 9)), 2) : Number(handleValueFormula(value, tableMeta, 9)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 9))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2088,9 +2115,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2088,9 +2115,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.props.quarter == 'q1' || this.props.quarter == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2128,7 +2155,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2128,7 +2155,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.0" : Number(value.value) : Number(value) == 0 ? "0.0" : Number(value))} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -2142,9 +2169,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2142,9 +2169,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 1) : Number(handleValueFormula(value, tableMeta, 10)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 10))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 2) : Number(handleValueFormula(value, tableMeta, 10)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 10))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2166,10 +2193,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2166,10 +2193,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 1) : Number(handleValueFormula(value, tableMeta, 10)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 10))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 10)), 2) : Number(handleValueFormula(value, tableMeta, 10)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 10))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2188,9 +2215,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2188,9 +2215,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={false} disabled={false}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2228,7 +2255,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2228,7 +2255,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.0" : Number(value.value) : Number(value) == 0 ? "0.0" : Number(value))} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -2242,9 +2269,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2242,9 +2269,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 11))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 11))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2266,10 +2293,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2266,10 +2293,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 1) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 11))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 11)), 2) : Number(handleValueFormula(value, tableMeta, 11)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 11))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2288,9 +2315,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2288,9 +2315,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={false} disabled={false}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2328,7 +2355,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2328,7 +2355,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 6 ? fixNumber(Number(value.value), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 6 ? Number(value.value) == 0 ? "0.0" : Number(value.value) : Number(value) == 0 ? "0.0" : Number(value))} value={(tableMeta.rowData[0] === 6 ? (Number(value.value) == 0 ? "0.00":(fixNumber(Number(value.value), 2))): ( Number(value)=== 0 ? "0.00" : fixNumber(Number(value), 2)))}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -2342,9 +2369,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2342,9 +2369,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 12))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 12))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2366,10 +2393,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2366,10 +2393,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 1) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 12))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 12)), 2) : Number(handleValueFormula(value, tableMeta, 12)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 12))}
// value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2388,9 +2415,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2388,9 +2415,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={false} disabled={false}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2428,7 +2455,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2428,7 +2455,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)} value={Number(value) == 0 ? "0.00" : fixNumber(Number(value), 2)}
/> />
: :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ? (handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
...@@ -2442,9 +2469,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2442,9 +2469,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 1) : Number(handleTotal(tableMeta)) == 0 ? "0.0" : Number(handleTotal(tableMeta))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 2) : Number(handleTotal(tableMeta)) == 0 ? "0.00" : Number(handleTotal(tableMeta))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2467,9 +2494,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2467,9 +2494,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 13)), 1) : Number(handleValueFormula(value, tableMeta, 13)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, 13))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleValueFormula(value, tableMeta, 13)), 2) : Number(handleValueFormula(value, tableMeta, 13)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, 13))}
disabled disabled
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2488,9 +2515,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2488,9 +2515,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 1) : Number(handleTotal(tableMeta)) == 0 ? "0.0" : Number(handleTotal(tableMeta))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTotal(tableMeta)), 2) : Number(handleTotal(tableMeta)) == 0 ? "0.00" : Number(handleTotal(tableMeta))}
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
......
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