Commit eb3e597b authored by Riri Novita's avatar Riri Novita

Update Issue BS

parent aa7174e7
......@@ -396,6 +396,7 @@ export default class BalanceSheetRO extends Component {
"currency_id": this.props.defaultCurrency.id,
"balance_sheet": data
}
console.log(payload);
api.create('UPLOAD').createRollingOutlookBS(payload).then(response => {
console.log(payload);
console.log(response);
......@@ -459,9 +460,16 @@ export default class BalanceSheetRO extends Component {
this.setState({ loading: true })
let n = 0
for (n = (this.props.quarter == 'q1' ? 10 : (this.props.quarter == 'q2' ? 13 : 16)); n <= 18; n++) {
if ((this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[n]), 2) : Number(i[n]) < Number(this.state.minValue) || this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[n]), 1) : Number(i[n]) > Number(this.state.maxValue))) {
if (this.props.defaultCurrency.id == 1) {
if ((fixNumber(Number(i[n]), 2) < Number(this.state.minValue) || fixNumber(Number(i[n]), 1) > Number(this.state.maxValue))) {
err = true
}
} else {
if ((Number(i[n]) < Number(this.state.minValue) || Number(i[n]) > Number(this.state.maxValue))) {
err = true
}
}
}
}
})
......@@ -1479,7 +1487,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1496,7 +1504,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -1648,7 +1656,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1665,7 +1673,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -1817,7 +1825,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1834,7 +1842,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -1986,7 +1994,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2003,7 +2011,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2155,7 +2163,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2172,7 +2180,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2323,7 +2331,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2340,7 +2348,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2491,7 +2499,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2508,7 +2516,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2659,7 +2667,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2676,7 +2684,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......@@ -2722,7 +2730,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 1) : Number(val) == 0 ? "0.0" : fixNumber(Number(val),1)}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 1) : Number(val) == 0 ? "0.0" : fixNumber(Number(val), 1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2827,7 +2835,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2844,7 +2852,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={fixNumber(Number(handleValidation(val, tableMeta)),12)}
value={fixNumber(Number(handleValidation(val, tableMeta)), 12)}
/>
</LightTooltip>
:
......
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