Commit e4e3fd1b authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

Faisal

See merge request !1391
parents f36f3058 ba7aac6b
......@@ -149,6 +149,7 @@ export default class BalanceSheetOLPA extends Component {
"company_id": this.props.company.company_id
}
api.create().getLastestUpdateOLPA(payload).then(response => {
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -527,7 +528,7 @@ export default class BalanceSheetOLPA extends Component {
// console.log(this.state.dataTable)
dataTable.map((i, index) => {
if (String(i[5]) == "Control (should be nil)") {
if ( Number(i[17]) < this.state.minValue || Number(i[17]) > this.state.maxValue ) {
if (Number(i[17]) < this.state.minValue || Number(i[17]) > this.state.maxValue) {
err = true
} else if (Number(i[18]) < this.state.minValue || Number(i[18]) > this.state.maxValue) {
err = true
......@@ -572,20 +573,20 @@ export default class BalanceSheetOLPA extends Component {
if (response.data.data.result && err === false) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
if (kansas == 0) {
this.setState({kansas: 1, loading: true}, () => {
this.setState({ kansas: 1, loading: true }, () => {
this.handleValidate()
})
} else {
this.setState({kansas: 0})
this.setState({ kansas: 0 })
}
} else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: true })
if (kansas == 0) {
this.setState({kansas: 1, loading: true}, () => {
this.setState({ kansas: 1, loading: true }, () => {
this.handleValidate()
})
} else {
this.setState({kansas: 0})
this.setState({ kansas: 0 })
}
}
} else {
......@@ -1883,6 +1884,7 @@ export default class BalanceSheetOLPA extends Component {
}
</div>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5 }}>Notes : {this.state.notes}</Typography>
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
......
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