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 { ...@@ -288,7 +288,7 @@ export default class BalanceSheet extends Component {
} else { } else {
this.props.saveToMasterBudget(payload) this.props.saveToMasterBudget(payload)
} }
this.props.onClickClose() // this.props.onClickClose()
} }
downloadTemplate = async () => { downloadTemplate = async () => {
...@@ -493,7 +493,10 @@ export default class BalanceSheet extends Component { ...@@ -493,7 +493,10 @@ export default class BalanceSheet extends Component {
this.props.getReport() this.props.getReport()
} }
} else { } else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -502,6 +505,7 @@ export default class BalanceSheet extends Component { ...@@ -502,6 +505,7 @@ export default class BalanceSheet extends Component {
} }
}) })
} }
}
} else { } else {
this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false }) this.setState({ alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error', loading: false })
} }
......
...@@ -20,7 +20,7 @@ import CashFlow from './CashFlow'; ...@@ -20,7 +20,7 @@ import CashFlow from './CashFlow';
import { DatePicker } from '@material-ui/pickers'; import { DatePicker } from '@material-ui/pickers';
import moment from 'moment'; import moment from 'moment';
import * as R from 'ramda' import * as R from 'ramda'
import { PhotoSizeSelectLargeTwoTone, ThreeSixty } from '@material-ui/icons'; import { PhotoSizeSelectLargeTwoTone, ThreeSixty, TripOriginSharp } from '@material-ui/icons';
import { startTransition } from 'react'; import { startTransition } from 'react';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
...@@ -1298,13 +1298,18 @@ export default class BudgetTahunan extends Component { ...@@ -1298,13 +1298,18 @@ export default class BudgetTahunan extends Component {
createCashFlow(payload) { createCashFlow(payload) {
api.create().createReportCF(payload).then((res) => { api.create().createReportCF(payload).then((res) => {
// console.log(res) console.log(res)
// this.getSubmission() // this.getSubmission()
if (res.data) { if (res.data) {
if (res.data.status === "success") { if (res.data.status === "success") {
this.setState({ visibleCF: false, visibleBudgetTahunan: true })
this.getSubmission() this.getSubmission()
} else { } 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) { // if (response.data) {
...@@ -2319,19 +2324,36 @@ export default class BudgetTahunan extends Component { ...@@ -2319,19 +2324,36 @@ export default class BudgetTahunan extends Component {
this.setState({ loading: true }, () => { this.setState({ loading: true }, () => {
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
}) })
console.log(data); console.log(type);
// // console.log(JSON.stringify(data)); // // console.log(JSON.stringify(data));
api.create('UPLOAD').createSubmitReport(data).then(response => { api.create('UPLOAD').createSubmitReport(data).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { 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) this.getSubmission(type)
} else { } else {
this.setState({ visibleAlertSave: true}) console.log(response.data);
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
// this.setState({ loading: false }, () => { // this.setState({ loading: false }, () => {
this.getSubmission() this.getSubmission()
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
}
// }) // })
} }
} else { } else {
...@@ -3772,7 +3794,7 @@ export default class BudgetTahunan extends Component { ...@@ -3772,7 +3794,7 @@ export default class BudgetTahunan extends Component {
marginRight: 20, marginRight: 20,
borderRadius: 9 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' }}> <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> <Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
......
...@@ -389,7 +389,7 @@ export default class CashFlow extends Component { ...@@ -389,7 +389,7 @@ export default class CashFlow extends Component {
console.log(dbcf) console.log(dbcf)
console.log(JSON.stringify(payload)) console.log(JSON.stringify(payload))
this.props.createCashFlow(payload) this.props.createCashFlow(payload)
this.props.onClickClose() // this.props.onClickClose()
} }
render() { render() {
......
...@@ -665,7 +665,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -665,7 +665,7 @@ export default class CorporateAnnualTarget extends Component {
this.props.onClickClose() this.props.onClickClose()
this.props.getReport() this.props.getReport()
} else { } 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -886,10 +886,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -886,10 +886,10 @@ export default class CorporateAnnualTarget extends Component {
"cat": data "cat": data
} }
console.log(JSON.stringify(payload)); 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 } let payload = { "item_report_id": this.state.dataDelete }
if (this.state.dataDelete.length > 0) { if (this.state.dataDelete.length > 0) {
...@@ -899,8 +899,13 @@ export default class CorporateAnnualTarget extends Component { ...@@ -899,8 +899,13 @@ export default class CorporateAnnualTarget extends Component {
// api.create().validateSubmitReport(payloadBro).then((response) => { // api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response) // // // // // console.log(response)
// if (response.data.data.result) { // if (response.data.data.result) {
if (type == 'submitted') {
this.props.saveToMasterBudget(payloadBro, 'CAT')
} else {
this.props.saveToMasterBudget(payloadBro) this.props.saveToMasterBudget(payloadBro)
this.props.onClickClose() }
// this.props.saveToMasterBudget(payloadBro)
// this.props.onClickClose()
// } else { // } else {
// } // }
......
...@@ -271,7 +271,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -271,7 +271,7 @@ export default class FixedAssetsMovement extends Component {
} else { } else {
this.props.saveToMasterBudget(payload) this.props.saveToMasterBudget(payload)
} }
this.props.onClickClose() // this.props.onClickClose()
} }
downloadTemplate = async () => { downloadTemplate = async () => {
...@@ -454,7 +454,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -454,7 +454,7 @@ export default class FixedAssetsMovement extends Component {
this.props.getReport() this.props.getReport()
} }
} else { } 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
......
...@@ -291,7 +291,7 @@ export default class ProfitLoss extends Component { ...@@ -291,7 +291,7 @@ export default class ProfitLoss extends Component {
} else { } else {
this.props.saveToMasterBudget(payload) this.props.saveToMasterBudget(payload)
} }
this.props.onClickClose() // this.props.onClickClose()
} }
downloadTemplate = async () => { downloadTemplate = async () => {
...@@ -470,7 +470,10 @@ export default class ProfitLoss extends Component { ...@@ -470,7 +470,10 @@ export default class ProfitLoss extends Component {
this.props.getReport() this.props.getReport()
} }
} else { } else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -478,6 +481,7 @@ export default class ProfitLoss extends Component { ...@@ -478,6 +481,7 @@ export default class ProfitLoss extends Component {
}, 1000); }, 1000);
} }
}) })
}
// alert(response.data.status) // alert(response.data.status)
} }
} else { } else {
......
...@@ -148,22 +148,22 @@ export default class TaxPlanning extends Component { ...@@ -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 }, { tbc: item.formula_tax.value_tbc, fcp: item.formula_tax.value_fc, tbf: item.formula_tax.value_tbf },
item.level, item.level,
item.description, 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.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.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.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.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.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.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.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.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.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.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.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.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), 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.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_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_more_year?.tbc, fcp: item.tax_planning.total_more_year?.fcp, tbf: item.tax_planning.total_more_year?.tbf },
item.order, 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_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 }, { 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 { ...@@ -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 }, { tbc: item.formula_tax.value_tbc, fcp: item.formula_tax.value_fc, tbf: item.formula_tax.value_tbf },
item.level, item.level,
item.description, 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.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.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.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.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.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.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.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.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.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.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.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.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), 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.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_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_more_year?.tbc, fcp: item.tax_planning.total_more_year?.fcp, tbf: item.tax_planning.total_more_year?.tbf },
item.order, 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_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 }, { 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 { ...@@ -361,8 +361,13 @@ export default class TaxPlanning extends Component {
} }
// console.log(payload); // console.log(payload);
// console.log(JSON.stringify(data)) // console.log(JSON.stringify(data))
// this.props.saveToMasterBudget(payload)
// this.props.onClickClose()
if (type == 'submitted') {
this.props.saveToMasterBudget(payload, 'TP')
} else {
this.props.saveToMasterBudget(payload) this.props.saveToMasterBudget(payload)
this.props.onClickClose() }
} }
fileHandler = (event) => { fileHandler = (event) => {
...@@ -644,7 +649,10 @@ export default class TaxPlanning extends Component { ...@@ -644,7 +649,10 @@ export default class TaxPlanning extends Component {
this.props.onClickClose() this.props.onClickClose()
this.props.getReport() this.props.getReport()
} else { } else {
this.setState({ visibleAlertSave: true, loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -652,6 +660,7 @@ export default class TaxPlanning extends Component { ...@@ -652,6 +660,7 @@ export default class TaxPlanning extends Component {
}, 1000); }, 1000);
} }
}) })
}
// alert(response.data.status) // alert(response.data.status)
} }
} else { } else {
...@@ -1040,7 +1049,7 @@ export default class TaxPlanning extends Component { ...@@ -1040,7 +1049,7 @@ export default class TaxPlanning extends Component {
let indexID = dataTable2.findIndex((val) => val[24] == splitform[0]) let indexID = dataTable2.findIndex((val) => val[24] == splitform[0])
if (indexID !== -1) { 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 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) anjay.push(valuezz == "" ? 0 : valuezz)
} }
} else { } else {
...@@ -9281,7 +9290,8 @@ export default class TaxPlanning extends Component { ...@@ -9281,7 +9290,8 @@ export default class TaxPlanning extends Component {
} }
</div> </div>
{this.state.visibleUpload && ( {
this.state.visibleUpload && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}> <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="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
...@@ -9321,9 +9331,11 @@ export default class TaxPlanning extends Component { ...@@ -9321,9 +9331,11 @@ export default class TaxPlanning extends Component {
</div> </div>
</div> </div>
)} )
}
{this.state.visibleAlertSave && ( {
this.state.visibleAlertSave && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}> <div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}>
<div style={{ margin: 30 }}> <div style={{ margin: 30 }}>
...@@ -9357,8 +9369,9 @@ export default class TaxPlanning extends Component { ...@@ -9357,8 +9369,9 @@ export default class TaxPlanning extends Component {
</div> </div>
</div> </div>
</div> </div>
)} )
</div> }
</div >
); );
} }
} }
...@@ -97,7 +97,7 @@ export default class ReportItems extends Component { ...@@ -97,7 +97,7 @@ export default class ReportItems extends Component {
formula_ytd: item[13] === undefined ? "" : item[13], formula_ytd: item[13] === undefined ? "" : item[13],
start_date: item[14] === undefined ? "" : item[14], start_date: item[14] === undefined ? "" : item[14],
end_date: item[15] === undefined ? "" : item[15], 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 { ...@@ -127,6 +127,7 @@ export default class ProfitLossOLPA extends Component {
"get_for": this.state.get_for, "get_for": this.state.get_for,
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"currency_id": this.props.defaultCurrency.id,
"outlook_pa_id": this.props.outlook_pa_id "outlook_pa_id": this.props.outlook_pa_id
} }
api.create().getLastestUpdateOLPA(payload).then(response => { api.create().getLastestUpdateOLPA(payload).then(response => {
......
...@@ -85,7 +85,9 @@ export default class ProfitLossROO extends Component { ...@@ -85,7 +85,9 @@ export default class ProfitLossROO extends Component {
saveDraft: true, saveDraft: true,
buttonError: true, buttonError: true,
viewOnly: true, viewOnly: true,
get_for: 'view' get_for: 'view',
defaultCurrencyUpload: this.props.defaultCurrency,
visibleAlertSave: false
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
...@@ -216,7 +218,8 @@ export default class ProfitLossROO extends Component { ...@@ -216,7 +218,8 @@ export default class ProfitLossROO extends Component {
"periode": this.props.periode, "periode": this.props.periode,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"revision": Number(this.props.revision), "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); console.log("getItemHierarki payload", payload);
api.create().getRollingOutlookPL(payload).then(response => { api.create().getRollingOutlookPL(payload).then(response => {
...@@ -388,6 +391,7 @@ export default class ProfitLossROO extends Component { ...@@ -388,6 +391,7 @@ export default class ProfitLossROO extends Component {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"periode": this.props.periode, "periode": this.props.periode,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"currency_id": this.props.defaultCurrency.id,
"quartal": this.props.quarter, "quartal": this.props.quarter,
"status": type, "status": type,
"profit_loss": data "profit_loss": data
...@@ -405,7 +409,7 @@ export default class ProfitLossROO extends Component { ...@@ -405,7 +409,7 @@ export default class ProfitLossROO extends Component {
} }
this.props.onClickClose() this.props.onClickClose()
} else { } 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'; document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
...@@ -474,7 +478,11 @@ export default class ProfitLossROO extends Component { ...@@ -474,7 +478,11 @@ export default class ProfitLossROO extends Component {
} }
checkUpload() { 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(JSON.stringify(this.state.payload));
console.log("checkUpload Response", response) console.log("checkUpload Response", response)
if (response.data) { if (response.data) {
...@@ -560,6 +568,7 @@ export default class ProfitLossROO extends Component { ...@@ -560,6 +568,7 @@ export default class ProfitLossROO extends Component {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"periode": this.props.periode, "periode": this.props.periode,
"report_id": this.props.report_id, "report_id": this.props.report_id,
currency_id: this.state.defaultCurrencyUpload?.id,
"quartal": this.props.quarter, "quartal": this.props.quarter,
"rolling_outlook_id": this.props.rollingOutlookID, "rolling_outlook_id": this.props.rollingOutlookID,
"status": type, "status": type,
...@@ -580,7 +589,7 @@ export default class ProfitLossROO extends Component { ...@@ -580,7 +589,7 @@ export default class ProfitLossROO extends Component {
// this.props.onClickClose() // this.props.onClickClose()
// this.props.getReport() // this.props.getReport()
} else { } 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -2677,6 +2686,7 @@ export default class ProfitLossROO extends Component { ...@@ -2677,6 +2686,7 @@ export default class ProfitLossROO extends Component {
</button> </button>
</div> </div>
</div> </div>
<div style={{ padding: '25px 30px' }}>
<UploadFile <UploadFile
type={this.state.uploadStatus} type={this.state.uploadStatus}
percentage={this.state.percentage} percentage={this.state.percentage}
...@@ -2693,6 +2703,44 @@ export default class ProfitLossROO extends Component { ...@@ -2693,6 +2703,44 @@ export default class ProfitLossROO extends Component {
}} }}
/> />
</div> </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> </div>
)} )}
</div> </div>
......
...@@ -2721,6 +2721,42 @@ export default class RollingOutlook extends Component { ...@@ -2721,6 +2721,42 @@ export default class RollingOutlook extends Component {
</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} />
</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 > </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