Commit 4c00357c authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Fixing Alert Rate Currency MB

See merge request !1822
parents 5ca5dfd2 8d8eba06
......@@ -288,7 +288,7 @@ export default class BalanceSheet extends Component {
} else {
this.props.saveToMasterBudget(payload)
}
this.props.onClickClose()
// this.props.onClickClose()
}
downloadTemplate = async () => {
......@@ -493,14 +493,18 @@ export default class BalanceSheet extends Component {
this.props.getReport()
}
} else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: 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")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
}
} else {
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false })
......
......@@ -20,7 +20,7 @@ import CashFlow from './CashFlow';
import { DatePicker } from '@material-ui/pickers';
import moment from 'moment';
import * as R from 'ramda'
import { PhotoSizeSelectLargeTwoTone, ThreeSixty } from '@material-ui/icons';
import { PhotoSizeSelectLargeTwoTone, ThreeSixty, TripOriginSharp } from '@material-ui/icons';
import { startTransition } from 'react';
var ct = require("../../library/CustomTable");
......@@ -1298,13 +1298,18 @@ export default class BudgetTahunan extends Component {
createCashFlow(payload) {
api.create().createReportCF(payload).then((res) => {
// console.log(res)
console.log(res)
// this.getSubmission()
if (res.data) {
if (res.data.status === "success") {
this.setState({ visibleCF: false, visibleBudgetTahunan: true })
this.getSubmission()
} else {
this.setState({ visibleAlertSave: true})
if (res.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ alert: true, messageAlert: res.data.message, tipeAlert: 'warning', loading: false })
}
}
}
// if (response.data) {
......@@ -2319,19 +2324,36 @@ export default class BudgetTahunan extends Component {
this.setState({ loading: true }, () => {
document.body.style.overflow = 'hidden';
})
console.log(data);
console.log(type);
// // console.log(JSON.stringify(data));
api.create('UPLOAD').createSubmitReport(data).then(response => {
console.log(response);
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
if (type === "PL" || "DraftPL") {
this.setState({ visiblePL: false, visibleBudgetTahunan: true })
} else if (type === "TP") {
this.setState({ visibleTP: false, visibleBudgetTahunan: true })
} else if (type === "BS") {
this.setState({ visibleBS: false, visibleBudgetTahunan: true })
} else if (type === "FAM") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true })
} else if (type === "CAT") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true })
} else {
this.setState({ visibleBudgetTahunan: true, loading: false })
}
this.getSubmission(type)
} else {
this.setState({ visibleAlertSave: true})
// this.setState({ loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
console.log(response.data);
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
// this.setState({ loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
}
// })
}
} else {
......@@ -3772,7 +3794,7 @@ export default class BudgetTahunan extends Component {
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
onClick={() => this.setState({ visibleAlertSave: false, loading: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
......
......@@ -389,7 +389,7 @@ export default class CashFlow extends Component {
console.log(dbcf)
console.log(JSON.stringify(payload))
this.props.createCashFlow(payload)
this.props.onClickClose()
// this.props.onClickClose()
}
render() {
......
......@@ -665,7 +665,7 @@ export default class CorporateAnnualTarget extends Component {
this.props.onClickClose()
this.props.getReport()
} else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
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")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -886,10 +886,10 @@ export default class CorporateAnnualTarget extends Component {
"cat": data
}
console.log(JSON.stringify(payload));
this.deleteReport(payload)
this.deleteReport(payload, type)
}
deleteReport(payloadBro) {
deleteReport(payloadBro, type) {
let payload = { "item_report_id": this.state.dataDelete }
if (this.state.dataDelete.length > 0) {
......@@ -899,8 +899,13 @@ export default class CorporateAnnualTarget extends Component {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
// if (response.data.data.result) {
this.props.saveToMasterBudget(payloadBro)
this.props.onClickClose()
if (type == 'submitted') {
this.props.saveToMasterBudget(payloadBro, 'CAT')
} else {
this.props.saveToMasterBudget(payloadBro)
}
// this.props.saveToMasterBudget(payloadBro)
// this.props.onClickClose()
// } else {
// }
......
......@@ -271,7 +271,7 @@ export default class FixedAssetsMovement extends Component {
} else {
this.props.saveToMasterBudget(payload)
}
this.props.onClickClose()
// this.props.onClickClose()
}
downloadTemplate = async () => {
......@@ -454,7 +454,7 @@ export default class FixedAssetsMovement extends Component {
this.props.getReport()
}
} else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......
......@@ -291,7 +291,7 @@ export default class ProfitLoss extends Component {
} else {
this.props.saveToMasterBudget(payload)
}
this.props.onClickClose()
// this.props.onClickClose()
}
downloadTemplate = async () => {
......@@ -470,14 +470,18 @@ export default class ProfitLoss extends Component {
this.props.getReport()
}
} else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: 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")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
// alert(response.data.status)
}
} else {
......
......@@ -148,22 +148,22 @@ export default class TaxPlanning extends Component {
{ tbc: item.formula_tax.value_tbc, fcp: item.formula_tax.value_fc, tbf: item.formula_tax.value_tbf },
item.level,
item.description,
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.january.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.january.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.january.tbf, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.february.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.february.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.february.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.february.tbf, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.march.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.march.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.march.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.march.tbf, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.april.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.april.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.april.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.april.tbf, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.may.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.may.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.may.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.may.tbf, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.june.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.june.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.june.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.june.tbf, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.july.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.july.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.july.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.july.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.august.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.august.tbc, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.august.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.august.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.september.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.september.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.september.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.september.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.october.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.october.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.october.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.october.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.november.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.november.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.november.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.november.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.december.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.december.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.december.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.january?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.january?.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.january?.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.january?.tbf, formula: item.tax_planning.january_formula } : item.tax_planning.january?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.february?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.february?.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.february?.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.february?.tbf, formula: item.tax_planning.february_formula } : item.tax_planning.february?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.march?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.march?.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.march?.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.march?.tbf, formula: item.tax_planning.march_formula } : item.tax_planning.march?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.april?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.april?.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.april?.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.april?.tbf, formula: item.tax_planning.april_formula } : item.tax_planning.april?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.may?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.may?.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.may?.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.may?.tbf, formula: item.tax_planning.may_formula } : item.tax_planning.may?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.june?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.june?.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.june?.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.june?.tbf, formula: item.tax_planning.june_formula } : item.tax_planning.june?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.july?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.july?.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.july?.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.july?.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.august?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.august?.tbc, formula: item.tax_planning.august_formula } : item.tax_planning.august?.tbc === null ? "0" : item.tax_planning.august?.tbc === "" ? "0" : item.tax_planning.august?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.august?.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.august?.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.september?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.september?.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.september?.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.september?.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.october?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.october?.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.october?.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.october?.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.november?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.november?.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.november?.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.november?.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.december?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.december?.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.december?.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.december?.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december?.tbf },
Number(item.tax_planning.total_current_year).toFixed(1),
// { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.total_next_year.tbc } : item.tax_planning.total_next_year.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.total_next_year.fcp } : item.tax_planning.total_next_year.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.total_next_year.tbf } : item.tax_planning.total_next_year.tbf },
{ tbc: item.tax_planning.total_next_year.tbc, fcp: item.tax_planning.total_next_year.fcp, tbf: item.tax_planning.total_next_year.tbf },
{ tbc: item.tax_planning.total_more_year.tbc, fcp: item.tax_planning.total_more_year.fcp, tbf: item.tax_planning.total_more_year.tbf },
{ tbc: item.tax_planning.total_next_year?.tbc, fcp: item.tax_planning.total_next_year?.fcp, tbf: item.tax_planning.total_next_year?.tbf },
{ tbc: item.tax_planning.total_more_year?.tbc, fcp: item.tax_planning.total_more_year?.fcp, tbf: item.tax_planning.total_more_year?.tbf },
item.order,
{ tbc: item.condition_it_should_be_tax.value_tbc, fcp: item.condition_it_should_be_tax.value_fc, tbf: item.condition_it_should_be_tax.value_tbf },
{ tbc: item.condition_if_wrong_tax.value_tbc, fcp: item.condition_if_wrong_tax.value_fc, tbf: item.condition_if_wrong_tax.value_tbf },
......@@ -191,22 +191,22 @@ export default class TaxPlanning extends Component {
{ tbc: item.formula_tax.value_tbc, fcp: item.formula_tax.value_fc, tbf: item.formula_tax.value_tbf },
item.level,
item.description,
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.january.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.january.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.january.tbf, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.february.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.february.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.february.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.february.tbf, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.march.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.march.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.march.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.march.tbf, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.april.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.april.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.april.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.april.tbf, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.may.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.may.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.may.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.may.tbf, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.june.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.june.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.june.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.june.tbf, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.july.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.july.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.july.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.july.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.august.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.august.tbc, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.august.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.august.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.september.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.september.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.september.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.september.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.october.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.october.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.october.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.october.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.november.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.november.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.november.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.november.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.december.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.december.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.december.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.january?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.january?.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.january?.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.january?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.january?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.january?.tbf, formula: item.tax_planning.january_formula } : item.tax_planning.january?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.february?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.february?.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.february?.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.february?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.february?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.february?.tbf, formula: item.tax_planning.february_formula } : item.tax_planning.february?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.march?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.march?.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.march?.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.march?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.march?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.march?.tbf, formula: item.tax_planning.march_formula } : item.tax_planning.march?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.april?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.april?.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.april?.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.april?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.april?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.april?.tbf, formula: item.tax_planning.april_formula } : item.tax_planning.april?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.may?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.may?.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.may?.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.may?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.may?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.may?.tbf, formula: item.tax_planning.may_formula } : item.tax_planning.may?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.june?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.june?.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.june?.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.june?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.june?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.june?.tbf, formula: item.tax_planning.june_formula } : item.tax_planning.june?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.july?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.july?.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.july?.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.july?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.july?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.july?.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.august?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.august?.tbc, formula: item.tax_planning.august_formula } : item.tax_planning.august?.tbc === null ? "0" : item.tax_planning.august?.tbc === "" ? "0" : item.tax_planning.august?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.august?.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.august?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.august?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.august?.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.september?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.september?.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.september?.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.september?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.september?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.september?.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.october?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.october?.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.october?.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.october?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.october?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.october?.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.november?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.november?.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.november?.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.november?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.november?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.november?.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november?.tbf },
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.december?.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.december?.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december?.tbc, fcp: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december?.fcp).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december?.fcp).toFixed(1) : item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.december?.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december?.fcp, tbf: this.props.status === 'CLOSED' && String(item.description).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(item.tax_planning.december?.tbf).toFixed(2) : this.props.status === 'CLOSED' ? Number(item.tax_planning.december?.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.december?.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december?.tbf },
Number(item.tax_planning.total_current_year).toFixed(1),
// { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.total_next_year.tbc } : item.tax_planning.total_next_year.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 || item.type_report_tax.value_fc.type_report_id == 7 ? { value: item.tax_planning.total_next_year.fcp } : item.tax_planning.total_next_year.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.total_next_year.tbf } : item.tax_planning.total_next_year.tbf },
{ tbc: item.tax_planning.total_next_year.tbc, fcp: item.tax_planning.total_next_year.fcp, tbf: item.tax_planning.total_next_year.tbf },
{ tbc: item.tax_planning.total_more_year.tbc, fcp: item.tax_planning.total_more_year.fcp, tbf: item.tax_planning.total_more_year.tbf },
{ tbc: item.tax_planning.total_next_year?.tbc, fcp: item.tax_planning.total_next_year?.fcp, tbf: item.tax_planning.total_next_year?.tbf },
{ tbc: item.tax_planning.total_more_year?.tbc, fcp: item.tax_planning.total_more_year?.fcp, tbf: item.tax_planning.total_more_year?.tbf },
item.order,
{ tbc: item.condition_it_should_be_tax.value_tbc, fcp: item.condition_it_should_be_tax.value_fc, tbf: item.condition_it_should_be_tax.value_tbf },
{ tbc: item.condition_if_wrong_tax.value_tbc, fcp: item.condition_if_wrong_tax.value_fc, tbf: item.condition_if_wrong_tax.value_tbf },
......@@ -361,8 +361,13 @@ export default class TaxPlanning extends Component {
}
// console.log(payload);
// console.log(JSON.stringify(data))
this.props.saveToMasterBudget(payload)
this.props.onClickClose()
// this.props.saveToMasterBudget(payload)
// this.props.onClickClose()
if (type == 'submitted') {
this.props.saveToMasterBudget(payload, 'TP')
} else {
this.props.saveToMasterBudget(payload)
}
}
fileHandler = (event) => {
......@@ -644,14 +649,18 @@ export default class TaxPlanning extends Component {
this.props.onClickClose()
this.props.getReport()
} else {
this.setState({ visibleAlertSave: true, loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
// alert(response.data.status)
}
} else {
......@@ -1040,7 +1049,7 @@ export default class TaxPlanning extends Component {
let indexID = dataTable2.findIndex((val) => val[24] == splitform[0])
if (indexID !== -1) {
let data = splitform[1] == 'TP1' ? dataTable2[indexID][tableMeta.columnIndex].tbc : splitform[1] == 'TP2' ? dataTable2[indexID][tableMeta.columnIndex].fcp : dataTable2[indexID][tableMeta.columnIndex].tbf
let valuezz = data.value == undefined ? data : data.value
let valuezz = data?.value == undefined ? data : data.value
anjay.push(valuezz == "" ? 0 : valuezz)
}
} else {
......@@ -9281,84 +9290,88 @@ export default class TaxPlanning extends Component {
}
</div>
{this.state.visibleUpload && (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span>
{
this.state.visibleUpload && (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span>
</div>
</div>
<div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}>
<button
type="button"
className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleUpload: false })}
>
<img src={Images.close} />
</button>
</div>
</div>
<div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}>
<button
type="button"
className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleUpload: false })}
>
<img src={Images.close} />
</button>
<div style={{ padding: '25px 30px' }}>
<UploadFile
type={this.state.uploadStatus}
percentage={this.state.percentage}
result={this.state.result}
acceptedFiles={["xlsx"]}
onHandle={(dt) => {
this.fileHandler(dt)
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
String(this.state.judul).includes("MASTER") && String(this.state.judul).includes("BUDGET") && String(this.state.judul).includes("TAX") && String(this.state.judul).includes("PLANNING") ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
/>
</div>
</div>
<div style={{ padding: '25px 30px' }}>
<UploadFile
type={this.state.uploadStatus}
percentage={this.state.percentage}
result={this.state.result}
acceptedFiles={["xlsx"]}
onHandle={(dt) => {
this.fileHandler(dt)
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
String(this.state.judul).includes("MASTER") && String(this.state.judul).includes("BUDGET") && String(this.state.judul).includes("TAX") && String(this.state.judul).includes("PLANNING") ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
/>
</div>
<div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></div>
<div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></div>
</div>
</div>
</div>
)}
)
}
{this.state.visibleAlertSave && (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}>
<div style={{ margin: 30 }}>
<div style={{ display: 'flex', marginTop: 76, marginBottom: 43 }}>
<div style={{ alignSelf: 'center', marginRight: 25 }}>
<img src={Images.warning} />
{
this.state.visibleAlertSave && (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}>
<div style={{ margin: 30 }}>
<div style={{ display: 'flex', marginTop: 76, marginBottom: 43 }}>
<div style={{ alignSelf: 'center', marginRight: 25 }}>
<img src={Images.warning} />
</div>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', marginTop: 10 }}>
<b>Rate Currency USD</b> pada periode yang dipilih <b>belum</b> diatur.<br /> Silahkan menghubungi Superadmin
</div>
</div>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', marginTop: 10 }}>
<b>Rate Currency USD</b> pada periode yang dipilih <b>belum</b> diatur.<br /> Silahkan menghubungi Superadmin
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<button
className="button"
type="button"
style={{
background: '#F6F7F9',
cursor: 'pointer',
border: '1px solid #3549609e',
outline: 'none',
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
</div>
</button>
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<button
className="button"
type="button"
style={{
background: '#F6F7F9',
cursor: 'pointer',
border: '1px solid #3549609e',
outline: 'none',
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
</div>
</button>
</div>
</div>
</div>
</div>
)}
</div>
)
}
</div >
);
}
}
......@@ -97,7 +97,7 @@ export default class ReportItems extends Component {
formula_ytd: item[13] === undefined ? "" : item[13],
start_date: item[14] === undefined ? "" : item[14],
end_date: item[15] === undefined ? "" : item[15],
is_can_convert_value: item[16] === undefined ? "" : item[16] === "Yes" || item[16] === "yes" ? 1 : 0,
is_can_convert_value: item[16] === undefined ? "" : item[16] === "Yes" || item[16] === "yes" || item[16] === "YES" ? 1 : 0,
})
}
})
......
......@@ -127,6 +127,7 @@ export default class ProfitLossOLPA extends Component {
"get_for": this.state.get_for,
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"currency_id": this.props.defaultCurrency.id,
"outlook_pa_id": this.props.outlook_pa_id
}
api.create().getLastestUpdateOLPA(payload).then(response => {
......
......@@ -85,7 +85,9 @@ export default class ProfitLossROO extends Component {
saveDraft: true,
buttonError: true,
viewOnly: true,
get_for: 'view'
get_for: 'view',
defaultCurrencyUpload: this.props.defaultCurrency,
visibleAlertSave: false
}
this.fileHandler = this.fileHandler.bind(this);
......@@ -216,7 +218,8 @@ export default class ProfitLossROO extends Component {
"periode": this.props.periode,
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"rolling_outlook_id": this.props.rollingOutlookID
"rolling_outlook_id": this.props.rollingOutlookID,
"currency_id": this.props.defaultCurrency.id
}
console.log("getItemHierarki payload", payload);
api.create().getRollingOutlookPL(payload).then(response => {
......@@ -388,6 +391,7 @@ export default class ProfitLossROO extends Component {
"company_id": this.props.company.company_id,
"periode": this.props.periode,
"report_id": this.props.report_id,
"currency_id": this.props.defaultCurrency.id,
"quartal": this.props.quarter,
"status": type,
"profit_loss": data
......@@ -405,7 +409,7 @@ export default class ProfitLossROO extends Component {
}
this.props.onClickClose()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
......@@ -474,7 +478,11 @@ export default class ProfitLossROO extends Component {
}
checkUpload() {
api.create().checkImportRollingOutlookPL(this.state.payload).then(response => {
let payload = {
...this.state.payload,
currency_id: this.state.defaultCurrencyUpload?.id
}
api.create().checkImportRollingOutlookPL(payload).then(response => {
// console.log(JSON.stringify(this.state.payload));
console.log("checkUpload Response", response)
if (response.data) {
......@@ -560,6 +568,7 @@ export default class ProfitLossROO extends Component {
"company_id": this.props.company.company_id,
"periode": this.props.periode,
"report_id": this.props.report_id,
currency_id: this.state.defaultCurrencyUpload?.id,
"quartal": this.props.quarter,
"rolling_outlook_id": this.props.rollingOutlookID,
"status": type,
......@@ -580,7 +589,7 @@ export default class ProfitLossROO extends Component {
// this.props.onClickClose()
// this.props.getReport()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -2677,21 +2686,60 @@ export default class ProfitLossROO extends Component {
</button>
</div>
</div>
<UploadFile
type={this.state.uploadStatus}
percentage={this.state.percentage}
result={this.state.result}
acceptedFiles={["xlsx"]}
onHandle={(dt) => {
this.fileHandler(dt)
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
String(this.state.judulColumn).includes("TEMPLATE") && String(this.state.judulColumn).includes("UPLOAD") && String(this.state.judul).includes("ROLLING") && String(this.state.judul).includes("OUTLOOK") && String(this.state.judul).includes("PROFIT") && String(this.state.judul).includes("LOSS") ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
/>
<div style={{ padding: '25px 30px' }}>
<UploadFile
type={this.state.uploadStatus}
percentage={this.state.percentage}
result={this.state.result}
acceptedFiles={["xlsx"]}
onHandle={(dt) => {
this.fileHandler(dt)
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
String(this.state.judulColumn).includes("TEMPLATE") && String(this.state.judulColumn).includes("UPLOAD") && String(this.state.judul).includes("ROLLING") && String(this.state.judul).includes("OUTLOOK") && String(this.state.judul).includes("PROFIT") && String(this.state.judul).includes("LOSS") ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
/>
</div>
<div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></div>
</div>
</div>
)}
{this.state.visibleAlertSave && (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}>
<div style={{ margin: 30 }}>
<div style={{ display: 'flex', marginTop: 76, marginBottom: 43 }}>
<div style={{ alignSelf: 'center', marginRight: 25 }}>
<img src={Images.warning} />
</div>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', marginTop: 10 }}>
<b>Rate Currency USD</b> pada periode yang dipilih <b>belum</b> diatur.<br /> Silahkan menghubungi Superadmin
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<button
className="button"
type="button"
style={{
background: '#F6F7F9',
cursor: 'pointer',
border: '1px solid #3549609e',
outline: 'none',
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
</div>
</button>
</div>
</div>
</div>
</div>
)}
......
......@@ -2721,6 +2721,42 @@ export default class RollingOutlook extends Component {
</div>
</div>
)}
{this.state.visibleAlertSave && (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}>
<div style={{ margin: 30 }}>
<div style={{ display: 'flex', marginTop: 76, marginBottom: 43 }}>
<div style={{ alignSelf: 'center', marginRight: 25 }}>
<img src={Images.warning} />
</div>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', marginTop: 10 }}>
<b>Rate Currency USD</b> pada periode yang dipilih <b>belum</b> diatur.<br /> Silahkan menghubungi Superadmin
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<button
className="button"
type="button"
style={{
background: '#F6F7F9',
cursor: 'pointer',
border: '1px solid #3549609e',
outline: 'none',
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
</div>
</button>
</div>
</div>
</div>
</div>
)}
</div >
);
}
......
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