Commit 0ff51395 authored by fahrur huzain's avatar fahrur huzain

CAT RO

parent f69f5658
......@@ -398,7 +398,7 @@ export default class CorporateAnnualTargetRO extends Component {
stateFR = false
}
// console.log(i[9] == null? "" : i[9].value)
if (this.props.defaultCurrency.id == 2) {
// if (this.props.defaultCurrency.id == 2) {
data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_name": String(i[5]),
......@@ -424,33 +424,33 @@ export default class CorporateAnnualTargetRO extends Component {
"strategic_initiative": String(i[24]),
"pic": String(i[25])
})
} else {
data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_name": String(i[5]),
"parent": i[2] == "" ? null : i[2],
"weight": String(i[6]),
"uom": String(i[7]),
"kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].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]),
"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]),
"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]),
"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]),
"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]),
"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]),
"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)),
"strategic_initiative": String(i[24]),
"pic": String(i[25])
})
}
// } else {
// data.push({
// "item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
// "item_name": String(i[5]),
// "parent": i[2] == "" ? null : i[2],
// "weight": String(i[6]),
// "uom": String(i[7]),
// "kpi_type": i[8] == null ? "" : i[8].value,
// "max_ach": i[9] == null ? "" : i[9].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]),
// "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]),
// "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]),
// "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]),
// "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]),
// "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]),
// "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)),
// "strategic_initiative": String(i[24]),
// "pic": String(i[25])
// })
// }
})
// console.log(JSON.stringify(data))
......@@ -650,7 +650,7 @@ export default class CorporateAnnualTargetRO extends Component {
stateFR = false
}
if (this.state.defaultCurrencyUpload?.id == 2) {
// if (this.state.defaultCurrencyUpload?.id == 2) {
data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_report": String(i[5]),
......@@ -675,32 +675,32 @@ export default class CorporateAnnualTargetRO extends Component {
"strategic": String(i[24]),
"pic": String(i[25])
})
} else {
data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_report": String(i[5]),
"weight": String(i[6]),
"uom": String(i[7]),
"kpi_type": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].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]),
"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]),
"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]),
"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]),
"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]),
"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]),
"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)),
"strategic": String(i[24]),
"pic": String(i[25])
})
}
// } else {
// data.push({
// "item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
// "item_report": String(i[5]),
// "weight": String(i[6]),
// "uom": String(i[7]),
// "kpi_type": i[8] == null ? "" : i[8].value,
// "max_ach": i[9] == null ? "" : i[9].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]),
// "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]),
// "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]),
// "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]),
// "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]),
// "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]),
// "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)),
// "strategic": String(i[24]),
// "pic": String(i[25])
// })
// }
})
let payload = {
......@@ -1440,13 +1440,22 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
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
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), 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>
......@@ -1467,13 +1476,22 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
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 ? 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>
......@@ -1494,13 +1512,22 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
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
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), 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>
......@@ -1528,7 +1555,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -1542,9 +1569,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1566,10 +1593,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1628,7 +1655,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -1642,9 +1669,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1666,10 +1693,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1728,7 +1755,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -1742,9 +1769,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1766,10 +1793,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 2 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1828,7 +1855,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -1842,9 +1869,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2: 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1866,10 +1893,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1928,7 +1955,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -1942,9 +1969,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1966,10 +1993,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2028,7 +2055,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -2042,9 +2069,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2066,10 +2093,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2128,7 +2155,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -2142,9 +2169,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2166,10 +2193,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2228,7 +2255,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -2242,9 +2269,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2266,10 +2293,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2328,7 +2355,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -2342,9 +2369,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2366,10 +2393,10 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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)}
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -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' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2428,7 +2455,7 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
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) ?
......@@ -2442,9 +2469,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2467,9 +2494,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2488,9 +2515,9 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
onBlur={(event) => {
// updateValue(event.target.value)
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