Commit 9d29bf7c authored by fahrur huzain's avatar fahrur huzain

issue CAT OLPA

parent 0ff51395
...@@ -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]) : String(Number(i[11].value)) : 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(Number(i[12].value)) : 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(Number(i[13].value)) : 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(Number(i[14].value)) : 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(Number(i[15].value)) : 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(Number(i[16].value)) : 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(Number(i[17].value)) : 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(Number(i[18].value)) : 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(Number(i[19].value)) : 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(Number(i[20].value)) : 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(Number(i[21].value)) : 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(Number(i[22].value)) : 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])
}) })
...@@ -1467,7 +1467,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1467,7 +1467,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 +1494,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1494,7 +1494,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 +1521,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1521,7 +1521,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 +1549,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1549,7 +1549,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 +1558,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1558,7 +1558,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 +1586,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1586,7 +1586,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 +1595,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1595,7 +1595,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 +1623,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1623,7 +1623,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 +1632,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1632,7 +1632,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 +1660,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1660,7 +1660,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 +1669,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1669,7 +1669,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 +1697,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1697,7 +1697,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 +1706,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1706,7 +1706,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 +1734,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1734,7 +1734,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 +1743,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1743,7 +1743,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 +1771,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1771,7 +1771,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 +1780,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1780,7 +1780,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 +1808,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1808,7 +1808,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 +1822,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1822,9 +1822,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 +1846,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1846,10 +1846,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 +1868,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1868,9 +1868,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 +1908,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1908,7 +1908,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 +1922,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1922,9 +1922,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 +1946,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1946,10 +1946,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 +1968,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1968,9 +1968,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 +2008,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2008,7 +2008,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 +2022,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2022,9 +2022,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 +2048,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2048,9 +2048,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 +2069,9 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -2069,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(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