Commit 76876868 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

push tp get mb sudah di pull

See merge request !1025
parents 25497c80 196220e9
......@@ -657,7 +657,7 @@ export default class SubHolding extends Component {
})
} else if (this.state.report.value === 5) {
api.create().getReportTPMB(payload).then(response => {
// console.log(payload);
console.log(payload);
console.log(response);
let dataTable = []
if (response.data) {
......@@ -676,27 +676,19 @@ export default class SubHolding extends Component {
{ tbc: item.formula_tax.value_tbc, fcp: item.formula_tax.value_fc, tbf: item.formula_tax.value_tbf },
item.level,
item.description,
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.january.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: this.props.status === 'CLOSED' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? Number(item.tax_planning.december.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf },
Number(item.tax_planning.total_current_year).toFixed(1),
{ tbc: item.tax_planning.total_next_year.tbc, fcp: item.tax_planning.total_next_year.fcp, tbf: item.tax_planning.total_next_year.tbf },
{ tbc: item.tax_planning.total_more_year.tbc, fcp: item.tax_planning.total_more_year.fcp, tbf: item.tax_planning.total_more_year.tbf },
item.tax_planning.january.tbf,
item.tax_planning.february.tbf,
item.tax_planning.march.tbf,
item.tax_planning.april.tbf,
item.tax_planning.may.tbf,
item.tax_planning.june.tbf,
item.tax_planning.july.tbf,
item.tax_planning.august.tbf,
item.tax_planning.september.tbf,
item.tax_planning.october.tbf,
item.tax_planning.november.tbf,
item.tax_planning.december.tbf,
item.order,
{ tbc: item.condition_it_should_be_tax.value_tbc, fcp: item.condition_it_should_be_tax.value_fc, tbf: item.condition_it_should_be_tax.value_tbf },
{ tbc: item.condition_if_wrong_tax.value_tbc, fcp: item.condition_if_wrong_tax.value_fc, tbf: item.condition_if_wrong_tax.value_tbf },
item.tax_planning.forecast_tbc_formula,
item.tax_planning.forecast_fcp_formula,
item.tax_planning.forecast_tbf_formula
])
}
if (item.children !== null) {
......@@ -718,27 +710,19 @@ export default class SubHolding extends Component {
{ tbc: item.formula_tax.value_tbc, fcp: item.formula_tax.value_fc, tbf: item.formula_tax.value_tbf },
item.level,
item.description,
{ tbc: this.props.status === 'CLOSED' ? Number(item.tax_planning.january.tbc).toFixed(1) : item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 || item.type_report_tax.value_tbc.type_report_id == 7 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: this.props.status === 'CLOSED' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? 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' ? Number(item.tax_planning.december.tbf).toFixed(1) : item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 || item.type_report_tax.value_tbf.type_report_id == 7 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf },
Number(item.tax_planning.total_current_year).toFixed(1),
{ tbc: item.tax_planning.total_next_year.tbc, fcp: item.tax_planning.total_next_year.fcp, tbf: item.tax_planning.total_next_year.tbf },
{ tbc: item.tax_planning.total_more_year.tbc, fcp: item.tax_planning.total_more_year.fcp, tbf: item.tax_planning.total_more_year.tbf },
item.tax_planning.january.tbf,
item.tax_planning.february.tbf,
item.tax_planning.march.tbf,
item.tax_planning.april.tbf,
item.tax_planning.may.tbf,
item.tax_planning.june.tbf,
item.tax_planning.july.tbf,
item.tax_planning.august.tbf,
item.tax_planning.september.tbf,
item.tax_planning.october.tbf,
item.tax_planning.november.tbf,
item.tax_planning.december.tbf,
item.order,
{ tbc: item.condition_it_should_be_tax.value_tbc, fcp: item.condition_it_should_be_tax.value_fc, tbf: item.condition_it_should_be_tax.value_tbf },
{ tbc: item.condition_if_wrong_tax.value_tbc, fcp: item.condition_if_wrong_tax.value_fc, tbf: item.condition_if_wrong_tax.value_tbf },
item.tax_planning.forecast_tbc_formula,
item.tax_planning.forecast_fcp_formula,
item.tax_planning.forecast_tbf_formula
])
if (item.children !== null) {
if (item.children.length > 0) {
......@@ -748,7 +732,7 @@ export default class SubHolding extends Component {
}
}
})
this.setState({ dataTable, loading: false, previewDownload: true }, () => {
this.setState({ dataTable, loading: false, previewTable: true, previewDownload: true }, () => {
console.log(this.state.dataTable)
// this.getTaxPlanMR(payload)
})
......
......@@ -9437,7 +9437,47 @@ export default class TableSubHolding extends Component {
}
]
const columnDBTP = [
const columnDBTP = [{
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
},
{
name: "Account",
options: {
......@@ -9451,10 +9491,10 @@ export default class TableSubHolding extends Component {
return (
<div style={{ width: 300 }}>
{
tableMeta.rowData[4] == 0 ?
tableMeta.rowData[7] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[7]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
}
......@@ -9521,15 +9561,15 @@ export default class TableSubHolding extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta)
// console.log(tableMeta)
return (
<div>
<div className="grid grid-3x content-center">
<div className="grid grid-4x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9542,7 +9582,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(1).toFixed(1)}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
......@@ -9550,9 +9591,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9565,7 +9606,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(2).toFixed(1)}
value={Number(tableMeta.rowData[10]).toFixed(1)}
/>
}
/>
......@@ -9573,9 +9614,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9588,7 +9629,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(3).toFixed(1)}
value={Number(tableMeta.rowData[11]).toFixed(1)}
/>
}
/>
......@@ -9596,9 +9637,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9611,7 +9652,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(4).toFixed(1)}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
}
/>
......@@ -9621,9 +9662,9 @@ export default class TableSubHolding extends Component {
</div>
<div className="grid grid-4x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9636,7 +9677,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(5).toFixed(1)}
value={Number(tableMeta.rowData[13]).toFixed(1)}
/>
}
/>
......@@ -9644,9 +9685,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9659,7 +9700,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(6).toFixed(1)}
value={Number(tableMeta.rowData[14]).toFixed(1)}
/>
}
/>
......@@ -9667,9 +9708,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9682,7 +9723,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(7).toFixed(1)}
value={Number(tableMeta.rowData[15]).toFixed(1)}
/>
}
/>
......@@ -9690,9 +9731,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9705,7 +9746,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(8).toFixed(1)}
value={Number(tableMeta.rowData[16]).toFixed(1)}
/>
}
/>
......@@ -9715,9 +9756,9 @@ export default class TableSubHolding extends Component {
</div>
<div className="grid grid-4x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9730,7 +9771,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(9).toFixed(1)}
value={Number(tableMeta.rowData[17]).toFixed(1)}
/>
}
/>
......@@ -9738,9 +9779,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9753,7 +9794,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(10).toFixed(1)}
value={Number(tableMeta.rowData[18]).toFixed(1)}
/>
}
/>
......@@ -9761,9 +9802,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9776,7 +9817,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(11).toFixed(1)}
value={Number(tableMeta.rowData[19]).toFixed(1)}
/>
}
/>
......@@ -9784,9 +9825,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[3] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
: tableMeta.rowData[3] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -9799,7 +9840,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(12).toFixed(1)}
value={Number(tableMeta.rowData[20]).toFixed(1)}
/>
}
/>
......@@ -9813,6 +9854,61 @@ export default class TableSubHolding extends Component {
}
}
}, {
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: `ACTUAL ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
......@@ -9874,7 +9970,7 @@ export default class TableSubHolding extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta)
// console.log(tableMeta)
return (
<div>
<div className="grid grid-3x content-center">
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