Commit 1c0c294d authored by fahrur huzain's avatar fahrur huzain

issue dua digit MB dan MR

parent ccdba6ff
...@@ -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,15 @@ export default class CorporateAnnualTarget extends Component { ...@@ -885,6 +885,15 @@ 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,19 +906,18 @@ export default class CorporateAnnualTarget extends Component { ...@@ -897,19 +906,18 @@ 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[0].value))/1000) : String(i[24]),
"total_current_year": String(Number(i[25])) == "" ? "0.0" : String(Number(i[25])),
"total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])), "total_next_year": String(Number(i[26])) == "" ? "0.0" : String(Number(i[26])),
"total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])), "total_more_year": String(Number(i[27])) == "" ? "0.0" : String(Number(i[27])),
"strategic": String(i[28]), "strategic": String(i[28]),
...@@ -926,21 +934,21 @@ export default class CorporateAnnualTarget extends Component { ...@@ -926,21 +934,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[0].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[25])) == "" ? "0.0" : String(Number(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[26])) == "" ? "0.0" : String(Number(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[27])) == "" ? "0.0" : String(Number(i[27])),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -1634,6 +1642,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1634,6 +1642,7 @@ export default class CorporateAnnualTarget extends Component {
return (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz)) return (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz))
// } // }
} }
// console.log(dataTable2)
const columns = [{ const columns = [{
name: "", name: "",
...@@ -2018,7 +2027,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2018,7 +2027,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 +2048,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2039,7 +2048,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 +2112,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2103,7 +2112,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 +2137,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2128,7 +2137,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 +2158,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2149,7 +2158,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 +2222,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2213,7 +2222,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 +2247,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2238,7 +2247,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 +2268,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2259,7 +2268,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 +2332,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2323,7 +2332,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 +2357,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2348,7 +2357,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 +2378,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2369,7 +2378,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 +2443,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2434,7 +2443,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 +2468,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2459,7 +2468,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 +2489,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2480,7 +2489,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 +2554,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2545,7 +2554,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 +2579,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2570,7 +2579,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 +2600,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2591,7 +2600,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 +2665,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2656,7 +2665,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 +2690,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2681,7 +2690,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 +2711,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2702,7 +2711,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 +2776,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2767,7 +2776,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 +2801,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2792,7 +2801,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 +2822,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2813,7 +2822,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 +2887,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2878,7 +2887,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 +2912,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2903,7 +2912,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 +2933,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2924,7 +2933,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 +2998,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -2989,7 +2998,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 +3023,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3014,7 +3023,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 +3044,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3035,7 +3044,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 +3109,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3100,7 +3109,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 +3134,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3125,7 +3134,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 +3155,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3146,7 +3155,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 +3220,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3211,7 +3220,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 +3245,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3236,7 +3245,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 +3266,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3257,7 +3266,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 +3331,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3322,7 +3331,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 +3356,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3347,7 +3356,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 +3377,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3368,7 +3377,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 +3443,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3434,7 +3443,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 +3468,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3459,7 +3468,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 +3489,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3480,7 +3489,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 +3554,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3545,7 +3554,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 +3579,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3570,7 +3579,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 +3600,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3591,7 +3600,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 +3665,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3656,7 +3665,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 +3690,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3681,7 +3690,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 +3711,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -3702,7 +3711,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) => {
......
...@@ -318,7 +318,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -318,7 +318,7 @@ export default class CorporateAnnualTargetMR extends Component {
} }
} }
}) })
// console.log(dataTable); console.log(dataTable);
this.setState({ dataTable, loading: false, saveDraft: true }, () => { this.setState({ dataTable, loading: false, saveDraft: true }, () => {
this.handleCalculate(dataTable) this.handleCalculate(dataTable)
}) })
...@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1745,7 +1745,7 @@ 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), 2) == 0 ? "0.0" : fixNumber(Number(value), 2)} 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={2} decimalScale={2}
...@@ -1761,7 +1761,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1761,7 +1761,7 @@ export default class CorporateAnnualTargetMR extends Component {
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)), 2) : fixNumber(Number(value), 2)) : (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={2} decimalScale={2}
...@@ -1792,16 +1792,28 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1792,16 +1792,28 @@ 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), 2) : 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), 2) : 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={2} decimalScale={2}
disabled={true} disabled={true}
/> />
......
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