Commit 0c872d54 authored by ardyardyaaan's avatar ardyardyaaan

Bug FIxing OL PA Tax Planning

parent a54d5983
...@@ -191,20 +191,80 @@ export default class TaxPlanningOLPA extends Component { ...@@ -191,20 +191,80 @@ export default class TaxPlanningOLPA 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 : item.tax_planning.january.tbc, fcp: item.tax_planning.january.fcp, // {tbc : item.tax_planning.january.tbc, fcp: item.tax_planning.january.fcp,
tbf: item.tax_planning.january.tbf === null ? "0" : item.tax_planning.january.tbf === "" ? "0" : item.tax_planning.january.tbf}, // tbf: item.tax_planning.january.tbf === null ? "0" : item.tax_planning.january.tbf === "" ? "0" : item.tax_planning.january.tbf},
{tbc : item.tax_planning.february.tbc, fcp: item.tax_planning.february.fcp, tbf: item.tax_planning.february.tbf}, // {tbc : item.tax_planning.february.tbc, fcp: item.tax_planning.february.fcp, tbf: item.tax_planning.february.tbf},
{tbc : item.tax_planning.march.tbc, fcp: item.tax_planning.march.fcp, tbf: item.tax_planning.march.tbf}, // {tbc : item.tax_planning.march.tbc, fcp: item.tax_planning.march.fcp, tbf: item.tax_planning.march.tbf},
{tbc : item.tax_planning.april.tbc, fcp: item.tax_planning.april.fcp, tbf: item.tax_planning.april.tbf}, // {tbc : item.tax_planning.april.tbc, fcp: item.tax_planning.april.fcp, tbf: item.tax_planning.april.tbf},
{tbc : item.tax_planning.may.tbc, fcp: item.tax_planning.may.fcp, tbf: item.tax_planning.may.tbf}, // {tbc : item.tax_planning.may.tbc, fcp: item.tax_planning.may.fcp, tbf: item.tax_planning.may.tbf},
{tbc : item.tax_planning.june.tbc, fcp: item.tax_planning.june.fcp, tbf: item.tax_planning.june.tbf}, // {tbc : item.tax_planning.june.tbc, fcp: item.tax_planning.june.fcp, tbf: item.tax_planning.june.tbf},
{tbc : item.tax_planning.july.tbc, fcp: item.tax_planning.july.fcp, tbf: item.tax_planning.july.tbf}, // {tbc : item.tax_planning.july.tbc, fcp: item.tax_planning.july.fcp, tbf: item.tax_planning.july.tbf},
{tbc : item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc, // {tbc : item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc,
fcp: item.tax_planning.august.fcp, tbf: item.tax_planning.august.tbf}, // fcp: item.tax_planning.august.fcp, tbf: item.tax_planning.august.tbf},
{tbc : item.tax_planning.september.tbc, fcp: item.tax_planning.september.fcp, tbf: item.tax_planning.september.tbf}, // {tbc : item.tax_planning.september.tbc, fcp: item.tax_planning.september.fcp, tbf: item.tax_planning.september.tbf},
{tbc : item.tax_planning.october.tbc, fcp: item.tax_planning.october.fcp, tbf: item.tax_planning.october.tbf}, // {tbc : item.tax_planning.october.tbc, fcp: item.tax_planning.october.fcp, tbf: 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.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 }, // { 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 },
{
tbc : item.tax_planning.january !== null ? item.tax_planning.january !== "" ? item.tax_planning.january.tbc !== null ? item.tax_planning.january.tbc !== "" ? item.tax_planning.january.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.january !== null ? item.tax_planning.january !== "" ? item.tax_planning.january.fcp !== null ? item.tax_planning.january.fcp !== "" ? item.tax_planning.january.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.january !== null ? item.tax_planning.january !== "" ? item.tax_planning.january.tbf !== null ? item.tax_planning.january.tbf !== "" ? item.tax_planning.january.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.february !== null ? item.tax_planning.february !== "" ? item.tax_planning.february.tbc !== null ? item.tax_planning.february.tbc !== "" ? item.tax_planning.february.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.february !== null ? item.tax_planning.february !== "" ? item.tax_planning.february.fcp !== null ? item.tax_planning.february.fcp !== "" ? item.tax_planning.february.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.february !== null ? item.tax_planning.february !== "" ? item.tax_planning.february.tbf !== null ? item.tax_planning.february.tbf !== "" ? item.tax_planning.february.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.march !== null ? item.tax_planning.march !== "" ? item.tax_planning.march.tbc !== null ? item.tax_planning.march.tbc !== "" ? item.tax_planning.march.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.march !== null ? item.tax_planning.march !== "" ? item.tax_planning.march.fcp !== null ? item.tax_planning.march.fcp !== "" ? item.tax_planning.march.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.march !== null ? item.tax_planning.march !== "" ? item.tax_planning.march.tbf !== null ? item.tax_planning.march.tbf !== "" ? item.tax_planning.march.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.april !== null ? item.tax_planning.april !== "" ? item.tax_planning.april.tbc !== null ? item.tax_planning.april.tbc !== "" ? item.tax_planning.april.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.april !== null ? item.tax_planning.april !== "" ? item.tax_planning.april.fcp !== null ? item.tax_planning.april.fcp !== "" ? item.tax_planning.april.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.april !== null ? item.tax_planning.april !== "" ? item.tax_planning.april.tbf !== null ? item.tax_planning.april.tbf !== "" ? item.tax_planning.april.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.may !== null ? item.tax_planning.may !== "" ? item.tax_planning.may.tbc !== null ? item.tax_planning.may.tbc !== "" ? item.tax_planning.may.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.may !== null ? item.tax_planning.may !== "" ? item.tax_planning.may.fcp !== null ? item.tax_planning.may.fcp !== "" ? item.tax_planning.may.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.may !== null ? item.tax_planning.may !== "" ? item.tax_planning.may.tbf !== null ? item.tax_planning.may.tbf !== "" ? item.tax_planning.may.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.june !== null ? item.tax_planning.june !== "" ? item.tax_planning.june.tbc !== null ? item.tax_planning.june.tbc !== "" ? item.tax_planning.june.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.june !== null ? item.tax_planning.june !== "" ? item.tax_planning.june.fcp !== null ? item.tax_planning.june.fcp !== "" ? item.tax_planning.june.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.june !== null ? item.tax_planning.june !== "" ? item.tax_planning.june.tbf !== null ? item.tax_planning.june.tbf !== "" ? item.tax_planning.june.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.july !== null ? item.tax_planning.july !== "" ? item.tax_planning.july.tbc !== null ? item.tax_planning.july.tbc !== "" ? item.tax_planning.july.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.july !== null ? item.tax_planning.july !== "" ? item.tax_planning.july.fcp !== null ? item.tax_planning.july.fcp !== "" ? item.tax_planning.july.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.july !== null ? item.tax_planning.july !== "" ? item.tax_planning.july.tbf !== null ? item.tax_planning.july.tbf !== "" ? item.tax_planning.july.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.august !== null ? item.tax_planning.august !== "" ? item.tax_planning.august.tbc !== null ? item.tax_planning.august.tbc !== "" ? item.tax_planning.august.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.august !== null ? item.tax_planning.august !== "" ? item.tax_planning.august.fcp !== null ? item.tax_planning.august.fcp !== "" ? item.tax_planning.august.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.august !== null ? item.tax_planning.august !== "" ? item.tax_planning.august.tbf !== null ? item.tax_planning.august.tbf !== "" ? item.tax_planning.august.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.september !== null ? item.tax_planning.september !== "" ? item.tax_planning.september.tbc !== null ? item.tax_planning.september.tbc !== "" ? item.tax_planning.september.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.september !== null ? item.tax_planning.september !== "" ? item.tax_planning.september.fcp !== null ? item.tax_planning.september.fcp !== "" ? item.tax_planning.september.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.september !== null ? item.tax_planning.september !== "" ? item.tax_planning.september.tbf !== null ? item.tax_planning.september.tbf !== "" ? item.tax_planning.september.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.october !== null ? item.tax_planning.october !== "" ? item.tax_planning.october.tbc !== null ? item.tax_planning.october.tbc !== "" ? item.tax_planning.october.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.october !== null ? item.tax_planning.october !== "" ? item.tax_planning.october.fcp !== null ? item.tax_planning.october.fcp !== "" ? item.tax_planning.october.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.october !== null ? item.tax_planning.october !== "" ? item.tax_planning.october.tbf !== null ? item.tax_planning.october.tbf !== "" ? item.tax_planning.october.tbf : "0" : "0" : "0" : "0"
},
{
tbc: this.props.status === 'CLOSED' ? item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbc !== null ? item.tax_planning.november.tbc !== "" ? Number(item.tax_planning.november.tbc).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbc !== null ? item.tax_planning.november.tbc !== "" ? Number(item.tax_planning.november.tbc).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.november_formula } : item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbc !== null ? item.tax_planning.november.tbc !== "" ? Number(item.tax_planning.november.tbc).toFixed(1) : "0" : "0" : "0" : "0",
fcp: this.props.status === 'CLOSED' ? item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.fcp !== null ? item.tax_planning.november.fcp !== "" ? Number(item.tax_planning.november.fcp).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.fcp !== null ? item.tax_planning.november.fcp !== "" ? Number(item.tax_planning.november.fcp).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.november_formula } : item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.fcp !== null ? item.tax_planning.november.fcp !== "" ? Number(item.tax_planning.november.fcp).toFixed(1) : "0" : "0" : "0" : "0",
tbf: this.props.status === 'CLOSED' ? item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbf !== null ? item.tax_planning.november.tbf !== "" ? Number(item.tax_planning.november.tbf).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbf !== null ? item.tax_planning.november.tbf !== "" ? Number(item.tax_planning.november.tbf).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.november_formula } : item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbf !== null ? item.tax_planning.november.tbf !== "" ? Number(item.tax_planning.november.tbf).toFixed(1) : "0" : "0" : "0" : "0"
},
{
tbc: this.props.status === 'CLOSED' ? item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbc !== null ? item.tax_planning.december.tbc !== "" ? Number(item.tax_planning.december.tbc).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbc !== null ? item.tax_planning.december.tbc !== "" ? Number(item.tax_planning.december.tbc).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.december_formula } : item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbc !== null ? item.tax_planning.december.tbc !== "" ? Number(item.tax_planning.december.tbc).toFixed(1) : "0" : "0" : "0" : "0",
fcp: this.props.status === 'CLOSED' ? item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.fcp !== null ? item.tax_planning.december.fcp !== "" ? Number(item.tax_planning.december.fcp).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.fcp !== null ? item.tax_planning.december.fcp !== "" ? Number(item.tax_planning.december.fcp).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.december_formula } : item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.fcp !== null ? item.tax_planning.december.fcp !== "" ? Number(item.tax_planning.december.fcp).toFixed(1) : "0" : "0" : "0" : "0",
tbf: this.props.status === 'CLOSED' ? item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbf !== null ? item.tax_planning.december.tbf !== "" ? Number(item.tax_planning.december.tbf).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbf !== null ? item.tax_planning.december.tbf !== "" ? Number(item.tax_planning.december.tbf).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.december_formula } : item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbf !== null ? item.tax_planning.december.tbf !== "" ? Number(item.tax_planning.december.tbf).toFixed(1) : "0" : "0" : "0" : "0"
},
item.tax_planning.total_current_year, item.tax_planning.total_current_year,
0, 0,
0, 0,
...@@ -232,20 +292,80 @@ export default class TaxPlanningOLPA extends Component { ...@@ -232,20 +292,80 @@ export default class TaxPlanningOLPA 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 : item.tax_planning.january.tbc, fcp: item.tax_planning.january.fcp, // {tbc : item.tax_planning.january.tbc, fcp: item.tax_planning.january.fcp,
tbf: item.tax_planning.january.tbf === null ? "0" : item.tax_planning.january.tbf === "" ? "0" : item.tax_planning.january.tbf}, // tbf: item.tax_planning.january.tbf === null ? "0" : item.tax_planning.january.tbf === "" ? "0" : item.tax_planning.january.tbf},
{tbc : item.tax_planning.february.tbc, fcp: item.tax_planning.february.fcp, tbf: item.tax_planning.february.tbf}, // {tbc : item.tax_planning.february.tbc, fcp: item.tax_planning.february.fcp, tbf: item.tax_planning.february.tbf},
{tbc : item.tax_planning.march.tbc, fcp: item.tax_planning.march.fcp, tbf: item.tax_planning.march.tbf}, // {tbc : item.tax_planning.march.tbc, fcp: item.tax_planning.march.fcp, tbf: item.tax_planning.march.tbf},
{tbc : item.tax_planning.april.tbc, fcp: item.tax_planning.april.fcp, tbf: item.tax_planning.april.tbf}, // {tbc : item.tax_planning.april.tbc, fcp: item.tax_planning.april.fcp, tbf: item.tax_planning.april.tbf},
{tbc : item.tax_planning.may.tbc, fcp: item.tax_planning.may.fcp, tbf: item.tax_planning.may.tbf}, // {tbc : item.tax_planning.may.tbc, fcp: item.tax_planning.may.fcp, tbf: item.tax_planning.may.tbf},
{tbc : item.tax_planning.june.tbc, fcp: item.tax_planning.june.fcp, tbf: item.tax_planning.june.tbf}, // {tbc : item.tax_planning.june.tbc, fcp: item.tax_planning.june.fcp, tbf: item.tax_planning.june.tbf},
{tbc : item.tax_planning.july.tbc, fcp: item.tax_planning.july.fcp, tbf: item.tax_planning.july.tbf}, // {tbc : item.tax_planning.july.tbc, fcp: item.tax_planning.july.fcp, tbf: item.tax_planning.july.tbf},
{tbc : item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc, // {tbc : item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc,
fcp: item.tax_planning.august.fcp, tbf: item.tax_planning.august.tbf}, // fcp: item.tax_planning.august.fcp, tbf: item.tax_planning.august.tbf},
{tbc : item.tax_planning.september.tbc, fcp: item.tax_planning.september.fcp, tbf: item.tax_planning.september.tbf}, // {tbc : item.tax_planning.september.tbc, fcp: item.tax_planning.september.fcp, tbf: item.tax_planning.september.tbf},
{tbc : item.tax_planning.october.tbc, fcp: item.tax_planning.october.fcp, tbf: item.tax_planning.october.tbf}, // {tbc : item.tax_planning.october.tbc, fcp: item.tax_planning.october.fcp, tbf: 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.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 }, // { 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 },
{
tbc : item.tax_planning.january !== null ? item.tax_planning.january !== "" ? item.tax_planning.january.tbc !== null ? item.tax_planning.january.tbc !== "" ? item.tax_planning.january.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.january !== null ? item.tax_planning.january !== "" ? item.tax_planning.january.fcp !== null ? item.tax_planning.january.fcp !== "" ? item.tax_planning.january.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.january !== null ? item.tax_planning.january !== "" ? item.tax_planning.january.tbf !== null ? item.tax_planning.january.tbf !== "" ? item.tax_planning.january.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.february !== null ? item.tax_planning.february !== "" ? item.tax_planning.february.tbc !== null ? item.tax_planning.february.tbc !== "" ? item.tax_planning.february.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.february !== null ? item.tax_planning.february !== "" ? item.tax_planning.february.fcp !== null ? item.tax_planning.february.fcp !== "" ? item.tax_planning.february.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.february !== null ? item.tax_planning.february !== "" ? item.tax_planning.february.tbf !== null ? item.tax_planning.february.tbf !== "" ? item.tax_planning.february.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.march !== null ? item.tax_planning.march !== "" ? item.tax_planning.march.tbc !== null ? item.tax_planning.march.tbc !== "" ? item.tax_planning.march.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.march !== null ? item.tax_planning.march !== "" ? item.tax_planning.march.fcp !== null ? item.tax_planning.march.fcp !== "" ? item.tax_planning.march.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.march !== null ? item.tax_planning.march !== "" ? item.tax_planning.march.tbf !== null ? item.tax_planning.march.tbf !== "" ? item.tax_planning.march.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.april !== null ? item.tax_planning.april !== "" ? item.tax_planning.april.tbc !== null ? item.tax_planning.april.tbc !== "" ? item.tax_planning.april.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.april !== null ? item.tax_planning.april !== "" ? item.tax_planning.april.fcp !== null ? item.tax_planning.april.fcp !== "" ? item.tax_planning.april.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.april !== null ? item.tax_planning.april !== "" ? item.tax_planning.april.tbf !== null ? item.tax_planning.april.tbf !== "" ? item.tax_planning.april.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.may !== null ? item.tax_planning.may !== "" ? item.tax_planning.may.tbc !== null ? item.tax_planning.may.tbc !== "" ? item.tax_planning.may.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.may !== null ? item.tax_planning.may !== "" ? item.tax_planning.may.fcp !== null ? item.tax_planning.may.fcp !== "" ? item.tax_planning.may.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.may !== null ? item.tax_planning.may !== "" ? item.tax_planning.may.tbf !== null ? item.tax_planning.may.tbf !== "" ? item.tax_planning.may.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.june !== null ? item.tax_planning.june !== "" ? item.tax_planning.june.tbc !== null ? item.tax_planning.june.tbc !== "" ? item.tax_planning.june.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.june !== null ? item.tax_planning.june !== "" ? item.tax_planning.june.fcp !== null ? item.tax_planning.june.fcp !== "" ? item.tax_planning.june.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.june !== null ? item.tax_planning.june !== "" ? item.tax_planning.june.tbf !== null ? item.tax_planning.june.tbf !== "" ? item.tax_planning.june.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.july !== null ? item.tax_planning.july !== "" ? item.tax_planning.july.tbc !== null ? item.tax_planning.july.tbc !== "" ? item.tax_planning.july.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.july !== null ? item.tax_planning.july !== "" ? item.tax_planning.july.fcp !== null ? item.tax_planning.july.fcp !== "" ? item.tax_planning.july.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.july !== null ? item.tax_planning.july !== "" ? item.tax_planning.july.tbf !== null ? item.tax_planning.july.tbf !== "" ? item.tax_planning.july.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.august !== null ? item.tax_planning.august !== "" ? item.tax_planning.august.tbc !== null ? item.tax_planning.august.tbc !== "" ? item.tax_planning.august.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.august !== null ? item.tax_planning.august !== "" ? item.tax_planning.august.fcp !== null ? item.tax_planning.august.fcp !== "" ? item.tax_planning.august.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.august !== null ? item.tax_planning.august !== "" ? item.tax_planning.august.tbf !== null ? item.tax_planning.august.tbf !== "" ? item.tax_planning.august.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.september !== null ? item.tax_planning.september !== "" ? item.tax_planning.september.tbc !== null ? item.tax_planning.september.tbc !== "" ? item.tax_planning.september.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.september !== null ? item.tax_planning.september !== "" ? item.tax_planning.september.fcp !== null ? item.tax_planning.september.fcp !== "" ? item.tax_planning.september.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.september !== null ? item.tax_planning.september !== "" ? item.tax_planning.september.tbf !== null ? item.tax_planning.september.tbf !== "" ? item.tax_planning.september.tbf : "0" : "0" : "0" : "0"
},
{
tbc : item.tax_planning.october !== null ? item.tax_planning.october !== "" ? item.tax_planning.october.tbc !== null ? item.tax_planning.october.tbc !== "" ? item.tax_planning.october.tbc : "0" : "0" : "0" : "0",
fcp : item.tax_planning.october !== null ? item.tax_planning.october !== "" ? item.tax_planning.october.fcp !== null ? item.tax_planning.october.fcp !== "" ? item.tax_planning.october.fcp : "0" : "0" : "0" : "0",
tbf : item.tax_planning.october !== null ? item.tax_planning.october !== "" ? item.tax_planning.october.tbf !== null ? item.tax_planning.october.tbf !== "" ? item.tax_planning.october.tbf : "0" : "0" : "0" : "0"
},
{
tbc: this.props.status === 'CLOSED' ? item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbc !== null ? item.tax_planning.november.tbc !== "" ? Number(item.tax_planning.november.tbc).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbc !== null ? item.tax_planning.november.tbc !== "" ? Number(item.tax_planning.november.tbc).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.november_formula } : item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbc !== null ? item.tax_planning.november.tbc !== "" ? Number(item.tax_planning.november.tbc).toFixed(1) : "0" : "0" : "0" : "0",
fcp: this.props.status === 'CLOSED' ? item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.fcp !== null ? item.tax_planning.november.fcp !== "" ? Number(item.tax_planning.november.fcp).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.fcp !== null ? item.tax_planning.november.fcp !== "" ? Number(item.tax_planning.november.fcp).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.november_formula } : item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.fcp !== null ? item.tax_planning.november.fcp !== "" ? Number(item.tax_planning.november.fcp).toFixed(1) : "0" : "0" : "0" : "0",
tbf: this.props.status === 'CLOSED' ? item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbf !== null ? item.tax_planning.november.tbf !== "" ? Number(item.tax_planning.november.tbf).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbf !== null ? item.tax_planning.november.tbf !== "" ? Number(item.tax_planning.november.tbf).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.november_formula } : item.tax_planning.november !== null ? item.tax_planning.november !== "" ? item.tax_planning.november.tbf !== null ? item.tax_planning.november.tbf !== "" ? Number(item.tax_planning.november.tbf).toFixed(1) : "0" : "0" : "0" : "0"
},
{
tbc: this.props.status === 'CLOSED' ? item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbc !== null ? item.tax_planning.december.tbc !== "" ? Number(item.tax_planning.december.tbc).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbc !== null ? item.tax_planning.december.tbc !== "" ? Number(item.tax_planning.december.tbc).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.december_formula } : item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbc !== null ? item.tax_planning.december.tbc !== "" ? Number(item.tax_planning.december.tbc).toFixed(1) : "0" : "0" : "0" : "0",
fcp: this.props.status === 'CLOSED' ? item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.fcp !== null ? item.tax_planning.december.fcp !== "" ? Number(item.tax_planning.december.fcp).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.fcp !== null ? item.tax_planning.december.fcp !== "" ? Number(item.tax_planning.december.fcp).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.december_formula } : item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.fcp !== null ? item.tax_planning.december.fcp !== "" ? Number(item.tax_planning.december.fcp).toFixed(1) : "0" : "0" : "0" : "0",
tbf: this.props.status === 'CLOSED' ? item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbf !== null ? item.tax_planning.december.tbf !== "" ? Number(item.tax_planning.december.tbf).toFixed(1) : "0" : "0" : "0" : "0" : 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 !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbf !== null ? item.tax_planning.december.tbf !== "" ? Number(item.tax_planning.december.tbf).toFixed(1) : "0" : "0" : "0" : "0", formula: item.tax_planning.december_formula } : item.tax_planning.december !== null ? item.tax_planning.december !== "" ? item.tax_planning.december.tbf !== null ? item.tax_planning.december.tbf !== "" ? Number(item.tax_planning.december.tbf).toFixed(1) : "0" : "0" : "0" : "0"
},
item.tax_planning.total_current_year, item.tax_planning.total_current_year,
0, 0,
0, 0,
...@@ -958,6 +1078,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -958,6 +1078,7 @@ export default class TaxPlanningOLPA extends Component {
// } // }
let data = dex == 1 ? value.tbc : dex == 2 ? value.fcp : value.tbf let data = dex == 1 ? value.tbc : dex == 2 ? value.fcp : value.tbf
// console.log(data); // console.log(data);
if (data.formula) {
let indexID = data.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode)) let indexID = data.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = data.formula[indexID].value let valuezz = data.formula[indexID].value
...@@ -965,6 +1086,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -965,6 +1086,7 @@ export default class TaxPlanningOLPA extends Component {
} }
} }
} }
}
} else { } else {
let indexID = dataTable2.findIndex((val) => val[24] == item) let indexID = dataTable2.findIndex((val) => val[24] == item)
if (indexID !== -1) { if (indexID !== -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment