Commit 763710d7 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

issue tp olpa 30 nov

See merge request !1557
parents f12a4977 5bf1a946
......@@ -263,7 +263,7 @@ export default class TaxPlanningOLPA extends Component {
}
}
})
this.setState({ dataTable, loading: false, buttonError: true, editable: true })
this.setState({ dataTable, loading: false, buttonError: false, editable: true })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -655,12 +655,12 @@ export default class TaxPlanningOLPA extends Component {
},
november: {
tbc: String(Number(i[19].tbc).toFixed(1)),
fcp: String(Number(i[19].fcp).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[19].fcp).toFixed(2)) : String(Number(i[19].fcp).toFixed(1)),
tbf: String(Number(i[19].tbf).toFixed(1))
},
december: {
tbc: String(Number(i[20].tbc).toFixed(1)),
fcp: String(Number(i[20].fcp).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[20].fcp).toFixed(2)) : String(Number(i[20].fcp).toFixed(1)),
tbf: String(Number(i[20].tbf).toFixed(1))
},
total_current_year: String(Number(i[21]).toFixed(1))
......@@ -783,7 +783,7 @@ export default class TaxPlanningOLPA extends Component {
if (String(i[8]) == "Control (should be nil)") {
this.setState({ loading: true })
if ((Number(i[19].tbf) < Number(this.state.minValue) || Number(i[19].tbf) > Number(this.state.maxValue)) || (Number(i[20].tbf) < Number(this.state.minValue) || Number(i[20].tbf) > Number(this.state.maxValue)) || (Number(i[21]) < Number(this.state.minValue) || Number(i[21]) > Number(this.state.maxValue))) {
if ((Number(i[19].tbf.value) < Number(this.state.minValue) || Number(i[19].tbf.value) > Number(this.state.maxValue)) || (Number(i[20].tbf.value) < Number(this.state.minValue) || Number(i[20].tbf.value) > Number(this.state.maxValue)) || (Number(i[21]) < Number(this.state.minValue) || Number(i[21]) > Number(this.state.maxValue))) {
errorContrl = true
editAble = true
}
......@@ -812,6 +812,7 @@ export default class TaxPlanningOLPA extends Component {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
} else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
console.log("masuk button error")
}
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -3377,8 +3378,9 @@ export default class TaxPlanningOLPA extends Component {
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.state.editable === true ?
null
onClick={() =>
this.state.editable === true ?
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({handleTekTekTek: 1, loading: true}, () => {
......
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