Commit ba7aac6b authored by faisalhamdi's avatar faisalhamdi

update!

parent ade45e1f
......@@ -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 {
......@@ -1879,11 +1880,11 @@ export default class BalanceSheetOLPA extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography>
</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