Commit a407b909 authored by Riri Novita's avatar Riri Novita

Update MR

parent af827e20
...@@ -1543,7 +1543,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1543,7 +1543,7 @@ export default class BalanceSheetMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.periode == 2021 && this.props.month.month_id == 1 ? false : true} disabled={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.periode == 2021 && this.props.month.month_id == 1 ? false : true}
value={Number(tableMeta.rowData[9]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.periode == 2021 && this.props.month.month_id == 1 ? fixNumber(Number(tableMeta.rowData[9]), 1) : fixNumber(Number(handleValueFormula(tableMeta, 9)), 1)) : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.periode == 2021 && this.props.month.month_id == 1 ? Number(tableMeta.rowData[9]) : Number(handleValueFormula(tableMeta, 9)))} value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.periode == 2021 && this.props.month.month_id == 1 ? fixNumber(Number(tableMeta.rowData[9]), 1) : fixNumber(Number(handleValueFormula(tableMeta, 9)), 1)) : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.periode == 2021 && this.props.month.month_id == 1 ? (Number(tableMeta.rowData[9]) == 0 ? "0.0" : Number(tableMeta.rowData[9])) : (Number(handleValueFormula(tableMeta, 9)) == 0 ? "0.0" : Number(handleValueFormula(tableMeta, 9))))}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -1684,7 +1684,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1684,7 +1684,7 @@ export default class BalanceSheetMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[10]), 1)} value={fixNumber(Number(tableMeta.rowData[10]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10]), 1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1829,7 +1829,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1829,7 +1829,7 @@ export default class BalanceSheetMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[11]), 1)} value={fixNumber(Number(tableMeta.rowData[11]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11]), 1)}
/> />
: :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
...@@ -1899,7 +1899,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1899,7 +1899,7 @@ export default class BalanceSheetMR extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[12]), 1)} value={fixNumber(Number(tableMeta.rowData[12]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12]), 1)}
/> />
// : // :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
...@@ -1950,7 +1950,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1950,7 +1950,7 @@ export default class BalanceSheetMR extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={fixNumber(Number(handleVariancePercent(tableMeta, 1, 3)), 1)} value={fixNumber(Number(handleVariancePercent(tableMeta, 1, 3)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 1, 3)), 1)}
/> />
} }
/> />
...@@ -1973,7 +1973,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1973,7 +1973,7 @@ export default class BalanceSheetMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[13]), 1)} value={fixNumber(Number(tableMeta.rowData[13]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13]), 1)}
/> />
// : // :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
...@@ -2043,7 +2043,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2043,7 +2043,7 @@ export default class BalanceSheetMR extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[14]), 1)} value={fixNumber(Number(tableMeta.rowData[14]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14]), 1)}
/> />
: :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
...@@ -2094,7 +2094,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2094,7 +2094,7 @@ export default class BalanceSheetMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
value={fixNumber(Number(handleVariancePercent(tableMeta, 2, 5)), 1)} value={fixNumber(Number(handleVariancePercent(tableMeta, 2, 5)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 2, 5)), 1)}
/> />
} }
/> />
...@@ -2117,7 +2117,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2117,7 +2117,7 @@ export default class BalanceSheetMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[15]), 1)} value={fixNumber(Number(tableMeta.rowData[15]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15]), 1)}
/> />
: :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
...@@ -2187,7 +2187,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2187,7 +2187,7 @@ export default class BalanceSheetMR extends Component {
suffix={'%'} suffix={'%'}
placeholder="" placeholder=""
disabled={true} disabled={true}
value={fixNumber(Number(tableMeta.rowData[16]), 1)} value={fixNumber(Number(tableMeta.rowData[16]), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16]), 1)}
/> />
: :
// tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
...@@ -2238,7 +2238,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2238,7 +2238,7 @@ export default class BalanceSheetMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
value={fixNumber(Number(handleVariancePercent(tableMeta, 3, 7)), 1)} value={fixNumber(Number(handleVariancePercent(tableMeta, 3, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 3, 7)), 1)}
/> />
} }
/> />
......
...@@ -610,7 +610,7 @@ export default class CashFlowMR extends Component { ...@@ -610,7 +610,7 @@ export default class CashFlowMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.defaultCurrency.id == 1 ? (this.props.PLBSFAMSubmitted ? fixNumber(Number(tableMeta.rowData[6].value), 1) : fixNumber(Number(handleValueFormula(tableMeta, 6)), 1)) : this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value) : Number(handleValueFormula(tableMeta, 6))} value={this.props.defaultCurrency.id == 1 ? (this.props.PLBSFAMSubmitted ? fixNumber(Number(tableMeta.rowData[6].value), 1) : fixNumber(Number(handleValueFormula(tableMeta, 6)), 1)) : this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value) == 0 ? "0.0" : Number(tableMeta.rowData[6].value) : Number(handleValueFormula(tableMeta, 6)) == 0 ? "0.0" : Number(handleValueFormula(tableMeta, 6))}
/> />
</span> </span>
: :
......
...@@ -1755,7 +1755,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1755,7 +1755,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={Number(value) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) : Number(value))} value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.0" : Number(value))}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={this.state.get_for == 'view' ? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)} disabled={this.state.get_for == 'view' ? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)}
decimalScale={1} decimalScale={1}
......
...@@ -1048,7 +1048,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1048,7 +1048,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[7]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[7]), 1) : Number(tableMeta.rowData[7])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[7]), 1) : Number(tableMeta.rowData[7]) == 0 ? "0.0" : Number(tableMeta.rowData[7])}
/> />
} }
/> />
...@@ -1090,7 +1090,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1090,7 +1090,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={this.props.isApprover ? true : (this.state.get_for == 'view' ? true : false)} disabled={this.props.isApprover ? true : (this.state.get_for == 'view' ? true : false)}
value={Number(tableMeta.rowData[8]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : Number(tableMeta.rowData[8])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : Number(tableMeta.rowData[8]) == 0 ? "0.0" : Number(tableMeta.rowData[8])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 8) handleChange(event.target.value, tableMeta, 8)
}} }}
...@@ -1107,7 +1107,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1107,7 +1107,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={String(tableMeta.rowData[5]).toLocaleLowerCase() == "beginning balance" && this.props.periode == 2021 && this.props.month.month_id == 1 ? false : true} disabled={String(tableMeta.rowData[5]).toLocaleLowerCase() == "beginning balance" && this.props.periode == 2021 && this.props.month.month_id == 1 ? false : true}
value={Number(tableMeta.rowData[8]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[5]).toLocaleLowerCase() == "beginning balance" && this.props.periode == 2021 && this.props.month.month_id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : fixNumber(Number(handleValueFormula(tableMeta, 8)), 1)) : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "beginning balance" && this.props.periode == 2021 && this.props.month.month_id == 1 ? Number(tableMeta.rowData[8]) : Number(handleValueFormula(tableMeta, 8)))} value={this.props.defaultCurrency.id == 1 ? (String(tableMeta.rowData[5]).toLocaleLowerCase() == "beginning balance" && this.props.periode == 2021 && this.props.month.month_id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : fixNumber(Number(handleValueFormula(tableMeta, 8)), 1)) : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "beginning balance" && this.props.periode == 2021 && this.props.month.month_id == 1 ? (Number(tableMeta.rowData[8]) == 0 ? "0.0" : Number(tableMeta.rowData[8])) : (Number(handleValueFormula(tableMeta, 8)) == 0 ? "0.0" : Number(handleValueFormula(tableMeta, 8))))}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 8) handleChange(event.target.value, tableMeta, 8)
}} }}
...@@ -1125,7 +1125,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1125,7 +1125,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[8]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : Number(tableMeta.rowData[8])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[8]), 1) : Number(tableMeta.rowData[8]) == 0 ? "0.0" : Number(tableMeta.rowData[8])}
/> />
} }
/> />
...@@ -1242,7 +1242,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1242,7 +1242,7 @@ export default class FixedAssetsMovementMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[10])), 1)} value={fixNumber(Number(Number(tableMeta.rowData[10])), 1) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[10])), 1)}
// value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[10]) * 100), 1)} // value={Number(tableMeta.rowData[10]) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[10]) * 100), 1)}
/> />
} }
...@@ -1261,7 +1261,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1261,7 +1261,7 @@ export default class FixedAssetsMovementMR extends Component {
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
// value={0} // value={0}
value={fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1)} value={fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 2, 3)), 1)}
/> />
} }
/> />
...@@ -1304,7 +1304,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1304,7 +1304,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[11]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 3, 4)), 1) : Number(handleVariance(tableMeta, 3, 4))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleVariance(tableMeta, 3, 4)), 1) : Number(handleVariance(tableMeta, 3, 4)) == 0 ? "0.0" : Number(handleVariance(tableMeta, 3, 4))}
/> />
} }
/> />
...@@ -1328,7 +1328,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1328,7 +1328,7 @@ export default class FixedAssetsMovementMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[12])), 1)} value={fixNumber(Number(Number(tableMeta.rowData[12])), 1) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[12])), 1)}
// value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[12]) * 100), 1)} // value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : fixNumber(Number(Number(tableMeta.rowData[12]) * 100), 1)}
/> />
} }
...@@ -1347,7 +1347,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1347,7 +1347,7 @@ export default class FixedAssetsMovementMR extends Component {
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
// value={0} // value={0}
value={fixNumber(Number(handleVariancePercent(tableMeta, 3, 5)), 1)} value={fixNumber(Number(handleVariancePercent(tableMeta, 3, 5)), 1) == 0 ? "0.0" : fixNumber(Number(handleVariancePercent(tableMeta, 3, 5)), 1)}
/> />
} }
/> />
......
...@@ -2129,7 +2129,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2129,7 +2129,7 @@ export default class ListOfCreditFacilities extends Component {
style={{ color: this.state.get_for == 'view' ? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: (tableMeta.rowData[10] == '0.00' || tableMeta.rowData[10] == '') && this.state.get_for == 'edit' ? '#ffac99' : 'transparent' }} style={{ color: this.state.get_for == 'view' ? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: (tableMeta.rowData[10] == '0.00' || tableMeta.rowData[10] == '') && this.state.get_for == 'edit' ? '#ffac99' : 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(value) == 0 ? "0.0" : this.state.get_for == 'view' ? fixNumber(Number(value), 2) : this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value)} value={this.state.get_for == 'view' ? fixNumber(Number(value), 2) : this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.0" : Number(value)}
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
// 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}
...@@ -2232,7 +2232,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2232,7 +2232,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[12], tableMeta, 12)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[12], tableMeta, 12))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[12], tableMeta, 12)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[12], tableMeta, 12)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[12], tableMeta, 12))}
/> />
} }
/> />
...@@ -2250,7 +2250,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2250,7 +2250,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
value={Number(tableMeta.rowData[12]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? (fixNumber(Number(tableMeta.rowData[12]), 1) == 0.0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12]), 1)) : (Number(tableMeta.rowData[12]) == 0.0 ? "0.0" : Number(tableMeta.rowData[12]))} value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(tableMeta.rowData[12]), 1) == 0.0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12]), 1)) : (Number(tableMeta.rowData[12]) == 0.0 ? "0.0" : Number(tableMeta.rowData[12]))}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 12) handleChange(event.target.value, tableMeta, 12)
}} }}
...@@ -2279,7 +2279,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2279,7 +2279,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[13]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[13], tableMeta, 13)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[13], tableMeta, 13))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[13], tableMeta, 13)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[13], tableMeta, 13)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[13], tableMeta, 13))}
/> />
} }
/> />
...@@ -2297,7 +2297,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2297,7 +2297,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[13]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[13]), 1) : Number(tableMeta.rowData[13])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[13]), 1) : Number(tableMeta.rowData[13]) == 0 ? "0.0" : Number(tableMeta.rowData[13])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 13) handleChange(event.target.value, tableMeta, 13)
}} }}
...@@ -2361,7 +2361,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2361,7 +2361,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[14]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[14], tableMeta, 14)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[14], tableMeta, 14))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[14], tableMeta, 14)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[14], tableMeta, 14)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[14], tableMeta, 14))}
/> />
} }
/> />
...@@ -2379,7 +2379,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2379,7 +2379,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Investment Loan' ? false : true} disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Investment Loan' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[14]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[14]), 1) : Number(tableMeta.rowData[14])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[14]), 1) : Number(tableMeta.rowData[14]) == 0 ? "0.0" : Number(tableMeta.rowData[14])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 14) handleChange(event.target.value, tableMeta, 14)
}} }}
...@@ -2407,7 +2407,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2407,7 +2407,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[15]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[15], tableMeta, 15)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[15], tableMeta, 15))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[15], tableMeta, 15)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[15], tableMeta, 15)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[15], tableMeta, 15))}
/> />
} }
/> />
...@@ -2425,7 +2425,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2425,7 +2425,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Investment Loan' ? false : true} disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Investment Loan' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[15]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[15]), 1) : Number(tableMeta.rowData[15])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[15]), 1) : Number(tableMeta.rowData[15]) == 0 ? "0.0" : Number(tableMeta.rowData[15])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 15) handleChange(event.target.value, tableMeta, 15)
}} }}
...@@ -2488,7 +2488,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2488,7 +2488,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[16]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[16], tableMeta, 16)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[16], tableMeta, 16))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[16], tableMeta, 16)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[16], tableMeta, 16)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[16], tableMeta, 16))}
/> />
} }
/> />
...@@ -2506,7 +2506,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2506,7 +2506,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Revolving Loan (KMK)' ? false : true} disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Revolving Loan (KMK)' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[16]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[16]), 1) : Number(tableMeta.rowData[16])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[16]), 1) : Number(tableMeta.rowData[16]) == 0 ? "0.0" : Number(tableMeta.rowData[16])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 16) handleChange(event.target.value, tableMeta, 16)
}} }}
...@@ -2534,7 +2534,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2534,7 +2534,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[17]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[17], tableMeta, 17)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[17], tableMeta, 17))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[17], tableMeta, 17)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[17], tableMeta, 17)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[17], tableMeta, 17))}
/> />
} }
/> />
...@@ -2552,7 +2552,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2552,7 +2552,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Revolving Loan (KMK)' ? false : true} disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Revolving Loan (KMK)' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[17]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[17]), 1) : Number(tableMeta.rowData[17])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[17]), 1) : Number(tableMeta.rowData[17]) == 0 ? "0.0" : Number(tableMeta.rowData[17])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 17) handleChange(event.target.value, tableMeta, 17)
}} }}
...@@ -2648,7 +2648,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2648,7 +2648,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[19]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[19], tableMeta, 19)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[19], tableMeta, 19))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[19], tableMeta, 19)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[19], tableMeta, 19)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[19], tableMeta, 19))}
/> />
} }
/> />
...@@ -2666,7 +2666,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2666,7 +2666,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Others' ? false : true} disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Others' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[19]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[19]), 1) : Number(tableMeta.rowData[19])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[19]), 1) : Number(tableMeta.rowData[19]) == 0 ? "0.0" : Number(tableMeta.rowData[19])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 19) handleChange(event.target.value, tableMeta, 19)
}} }}
...@@ -2694,7 +2694,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2694,7 +2694,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[20]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[20], tableMeta, 20)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[20], tableMeta, 20))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[20], tableMeta, 20)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[20], tableMeta, 20)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[20], tableMeta, 20))}
/> />
} }
/> />
...@@ -2712,7 +2712,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2712,7 +2712,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Others' ? false : true} disabled={this.state.get_for == 'view' ? true : tableMeta.rowData[7] == null ? true : tableMeta.rowData[7].value == 'Others' ? false : true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[20]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[20]), 1) : Number(tableMeta.rowData[20])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[20]), 1) : Number(tableMeta.rowData[20]) == 0 ? "0.0" : Number(tableMeta.rowData[20])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 20) handleChange(event.target.value, tableMeta, 20)
}} }}
...@@ -2890,7 +2890,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2890,7 +2890,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[23]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23))}
/> />
} }
/> />
...@@ -2908,7 +2908,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2908,7 +2908,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[23]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23))}
/> />
} }
/> />
...@@ -2933,7 +2933,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2933,7 +2933,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[24]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24))}
/> />
} }
/> />
...@@ -2951,7 +2951,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2951,7 +2951,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[24]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24))} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)), 1) : Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)) == 0 ? "0.0" : Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24))}
/> />
} }
/> />
...@@ -3013,7 +3013,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3013,7 +3013,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[25]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[25]), 2) : Number(tableMeta.rowData[25])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[25]), 2) : Number(tableMeta.rowData[25]) == 0 ? "0.0" : Number(tableMeta.rowData[25])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 25) handleChange(event.target.value, tableMeta, 25)
}} }}
...@@ -3040,7 +3040,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3040,7 +3040,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[26]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio")), 1) : Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio"))} value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio")), 1)) : (Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio")))}
/> />
} }
/> />
...@@ -3098,7 +3098,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3098,7 +3098,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[27]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[27]), 2) : Number(tableMeta.rowData[27])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[27]), 2) : Number(tableMeta.rowData[27]) == 0 ? "0.0" : Number(tableMeta.rowData[27])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 27) handleChange(event.target.value, tableMeta, 27)
}} }}
...@@ -3125,7 +3125,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3125,7 +3125,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[28]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio")), 2) : Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio"))} value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio")), 2)) : (Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio")))}
/> />
} }
/> />
...@@ -3183,7 +3183,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3183,7 +3183,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[29]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[29]), 2) : Number(tableMeta.rowData[29])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[29]), 2) : Number(tableMeta.rowData[29]) == 0 ? "0.0" : Number(tableMeta.rowData[29])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 29) handleChange(event.target.value, tableMeta, 29)
}} }}
...@@ -3210,7 +3210,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3210,7 +3210,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 1 : 16}
value={Number(tableMeta.rowData[30]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD")), 2) : Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD"))} value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD")), 2)) : (Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD")))}
/> />
} }
/> />
...@@ -3268,7 +3268,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3268,7 +3268,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[31]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[31]), 2) : Number(tableMeta.rowData[31])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[31]), 2) : Number(tableMeta.rowData[31]) == 0 ? "0.0" : Number(tableMeta.rowData[31])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 31) handleChange(event.target.value, tableMeta, 31)
}} }}
...@@ -3295,7 +3295,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3295,7 +3295,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[32]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")), 2) : Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD"))} value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")), 2)) : (Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) )}
/> />
} }
/> />
...@@ -3385,7 +3385,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3385,7 +3385,7 @@ export default class ListOfCreditFacilities extends Component {
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[34]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[34]), 2) : Number(tableMeta.rowData[34])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[34]), 2) : Number(tableMeta.rowData[34]) == 0 ? "0.0" : Number(tableMeta.rowData[34])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 34) handleChange(event.target.value, tableMeta, 34)
}} }}
...@@ -3413,7 +3413,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3413,7 +3413,7 @@ export default class ListOfCreditFacilities extends Component {
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[35]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[35]), 2) : Number(tableMeta.rowData[35])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[35]), 2) : Number(tableMeta.rowData[35]) == 0 ? "0.0" : Number(tableMeta.rowData[35])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 35) handleChange(event.target.value, tableMeta, 35)
}} }}
...@@ -3507,7 +3507,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3507,7 +3507,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[37]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[37]), 2) : Number(tableMeta.rowData[37])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[37]), 2) : Number(tableMeta.rowData[37]) == 0 ? "0.0" : Number(tableMeta.rowData[37])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 37) handleChange(event.target.value, tableMeta, 37)
}} }}
...@@ -3536,7 +3536,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3536,7 +3536,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[38]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[38]), 2) : Number(tableMeta.rowData[38])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[38]), 2) : Number(tableMeta.rowData[38]) == 0 ? "0.0" : Number(tableMeta.rowData[38])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 38) handleChange(event.target.value, tableMeta, 38)
}} }}
...@@ -3630,7 +3630,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3630,7 +3630,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[40]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[40]), 2) : Number(tableMeta.rowData[40])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[40]), 2) : Number(tableMeta.rowData[40]) == 0 ? "0.0" : Number(tableMeta.rowData[40])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 40) handleChange(event.target.value, tableMeta, 40)
}} }}
...@@ -3659,7 +3659,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3659,7 +3659,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[41]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[41]), 2) : Number(tableMeta.rowData[41])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[41]), 2) : Number(tableMeta.rowData[41]) == 0 ? "0.0" : Number(tableMeta.rowData[41])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 41) handleChange(event.target.value, tableMeta, 41)
}} }}
...@@ -3753,7 +3753,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3753,7 +3753,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[43]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[43]), 2) : Number(tableMeta.rowData[43])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[43]), 2) : Number(tableMeta.rowData[43]) == 0 ? "0.0" : Number(tableMeta.rowData[43])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 43) handleChange(event.target.value, tableMeta, 43)
}} }}
...@@ -3782,7 +3782,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3782,7 +3782,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false} fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2} // decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16} decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={Number(tableMeta.rowData[44]) == 0 ? "0.0" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[44]), 2) : Number(tableMeta.rowData[44])} value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[44]), 2) : Number(tableMeta.rowData[44]) == 0 ? "0.0" : Number(tableMeta.rowData[44])}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 44) handleChange(event.target.value, tableMeta, 44)
}} }}
......
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