Commit 7307d98d authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-STAGING'

Fixing Issue RO

See merge request !2127
parents cde76456 5b4dc246
......@@ -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>
:
......
......@@ -760,7 +760,6 @@ export default class TaxPlanning extends Component {
// let data = []
let errorContrl = this.state.buttonError
let editAble = this.state.editAble
// console.log(this.state.dataTable)
this.state.dataTable.map((i, index) => {
if (String(i[8]) == "Control (should be nil)") {
this.setState({ loading: true })
......@@ -7190,11 +7189,15 @@ export default class TaxPlanning extends Component {
marginRight: 20
}}
onClick={() => {
this.setState({ loading: true, dataTable: dataTable2 }, () => {
this.setState({ datatable: dataTable2 }, () => {
setTimeout(() => {
this.setState({ loading: true }, () => {
setTimeout(() => {
this.handleValidate()
}, 100);
})
}, 100);
})
}}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
......@@ -7308,11 +7311,15 @@ export default class TaxPlanning extends Component {
}}
onClick={() => {
// this.forceUpdate()
this.setState({ loading: true, buttonDraft: false }, () => {
this.setState({ datatable: dataTable2 }, () => {
setTimeout(() => {
this.setState({ loading: true }, () => {
setTimeout(() => {
this.handleValidate()
}, 100);
})
}, 100);
})
}}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
......
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