Commit 63c84dba authored by d.arizona's avatar d.arizona

apdet

parent f855fbc7
...@@ -492,7 +492,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -492,7 +492,7 @@ export default class FixedAssetsMovement extends Component {
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = tableMeta.rowData[18].formula[indexID].value let valuezz = tableMeta.rowData[18].formula[indexID].value
// baru.push(valuezz) // baru.push(valuezz)
anjay.push(valuezz) anjay.push(valuezz == ""? 0 : valuezz)
// console.log(valuezz) // console.log(valuezz)
} }
} else { } else {
...@@ -501,7 +501,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -501,7 +501,7 @@ export default class FixedAssetsMovement extends Component {
if (indexID !== -1) { if (indexID !== -1) {
// console.log(value.formula[indexID].value) // console.log(value.formula[indexID].value)
let valuezz = value.formula[indexID].value let valuezz = value.formula[indexID].value
anjay.push(valuezz) anjay.push(valuezz == ""? 0 : valuezz)
} }
} }
} else { } else {
......
...@@ -110,18 +110,18 @@ export default class TaxPlanning extends Component { ...@@ -110,18 +110,18 @@ 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: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.january.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.january.tbf, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.january.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.january.tbf, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.february.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.february.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.february.tbf, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.february.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.february.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.february.tbf, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.march.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.march.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.march.tbf, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.march.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.march.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.march.tbf, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.april.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.april.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.april.tbf, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.april.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.april.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.april.tbf, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.may.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.may.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.may.tbf, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.may.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.may.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.may.tbf, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.june.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.june.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.june.tbf, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.june.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.june.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.june.tbf, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.july.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.july.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.july.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.july.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.july.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.july.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { 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: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.august.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.august.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { 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: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.august.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.august.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.september.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.september.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.september.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.september.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.september.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.september.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.october.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.october.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.october.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.october.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.october.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.october.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.november.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.november.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.november.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.november.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.november.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.november.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbf },
{ tbc: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.december.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbc, fcp: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.december.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december.fcp, tbf: item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.december.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.december.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf },
item.tax_planning.total_current_year, item.tax_planning.total_current_year,
{ 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 },
...@@ -149,21 +149,18 @@ export default class TaxPlanning extends Component { ...@@ -149,21 +149,18 @@ 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: item.tax_planning.january.tbc, fcp: item.tax_planning.january.fcp, tbf: item.tax_planning.january.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.january.tbc, formula: item.tax_planning.january_formula } : item.tax_planning.january.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.january.fcp, formula: item.tax_planning.january_formula } : item.tax_planning.january.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.january.tbf, formula: item.tax_planning.january_formula } : 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.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.february.tbc, formula: item.tax_planning.february_formula } : item.tax_planning.february.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.february.fcp, formula: item.tax_planning.february_formula } : item.tax_planning.february.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.february.tbf, formula: item.tax_planning.february_formula } : 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.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.march.tbc, formula: item.tax_planning.march_formula } : item.tax_planning.march.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.march.fcp, formula: item.tax_planning.march_formula } : item.tax_planning.march.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.march.tbf, formula: item.tax_planning.march_formula } : 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.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.april.tbc, formula: item.tax_planning.april_formula } : item.tax_planning.april.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.april.fcp, formula: item.tax_planning.april_formula } : item.tax_planning.april.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.april.tbf, formula: item.tax_planning.april_formula } : 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.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.may.tbc, formula: item.tax_planning.may_formula } : item.tax_planning.may.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.may.fcp, formula: item.tax_planning.may_formula } : item.tax_planning.may.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.may.tbf, formula: item.tax_planning.may_formula } : 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.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.june.tbc, formula: item.tax_planning.june_formula } : item.tax_planning.june.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.june.fcp, formula: item.tax_planning.june_formula } : item.tax_planning.june.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.june.tbf, formula: item.tax_planning.june_formula } : 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.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.july.tbc, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.july.fcp, formula: item.tax_planning.july_formula } : item.tax_planning.july.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.july.tbf, formula: item.tax_planning.july_formula } : item.tax_planning.july.tbf },
{ { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { 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: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.august.fcp, formula: item.tax_planning.august_formula } : item.tax_planning.august.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.august.tbf, formula: item.tax_planning.august_formula } : item.tax_planning.august.tbf },
tbc: item.tax_planning.august.tbc === null ? "0" : item.tax_planning.august.tbc === "" ? "0" : item.tax_planning.august.tbc, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.september.tbc, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.september.fcp, formula: item.tax_planning.september_formula } : item.tax_planning.september.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.september.tbf, formula: item.tax_planning.september_formula } : item.tax_planning.september.tbf },
fcp: item.tax_planning.august.fcp, tbf: item.tax_planning.august.tbf { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.october.tbc, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.october.fcp, formula: item.tax_planning.october_formula } : item.tax_planning.october.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.october.tbf, formula: item.tax_planning.october_formula } : item.tax_planning.october.tbf },
}, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.november.tbc, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.november.fcp, formula: item.tax_planning.november_formula } : item.tax_planning.november.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.november.tbf, formula: item.tax_planning.november_formula } : item.tax_planning.november.tbf },
{ tbc: item.tax_planning.september.tbc, fcp: item.tax_planning.september.fcp, tbf: item.tax_planning.september.tbf }, { tbc: item.type_report_tax.value_tbc.type_report_id == 5 || item.type_report_tax.value_tbc.type_report_id == 6 ? { value: item.tax_planning.december.tbc, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbc, fcp: item.type_report_tax.value_fc.type_report_id == 5 || item.type_report_tax.value_fc.type_report_id == 6 ? { value: item.tax_planning.december.fcp, formula: item.tax_planning.december_formula } : item.tax_planning.december.fcp, tbf: item.type_report_tax.value_tbf.type_report_id == 5 || item.type_report_tax.value_tbf.type_report_id == 6 ? { value: item.tax_planning.december.tbf, formula: item.tax_planning.december_formula } : item.tax_planning.december.tbf },
{ tbc: item.tax_planning.october.tbc, fcp: item.tax_planning.october.fcp, tbf: item.tax_planning.october.tbf },
{ tbc: item.tax_planning.november.tbc, fcp: item.tax_planning.november.fcp, tbf: item.tax_planning.november.tbf },
{ tbc: item.tax_planning.december.tbc, fcp: item.tax_planning.december.fcp, tbf: item.tax_planning.december.tbf },
item.tax_planning.total_current_year, item.tax_planning.total_current_year,
{ 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 },
...@@ -768,8 +765,6 @@ export default class TaxPlanning extends Component { ...@@ -768,8 +765,6 @@ export default class TaxPlanning extends Component {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleValueFormula = (value, tableMeta, dex) => { const handleValueFormula = (value, tableMeta, dex) => {
let form = dex === 1 ? tableMeta.rowData[6].tbc : dex === 2 ? tableMeta.rowData[6].fcp : tableMeta.rowData[6].tbf let form = dex === 1 ? tableMeta.rowData[6].tbc : dex === 2 ? tableMeta.rowData[6].fcp : tableMeta.rowData[6].tbf
console.log(form);
console.log(tableMeta.columnIndex, dex);
let splitFormula = String(form).split('@') let splitFormula = String(form).split('@')
let baru = [] let baru = []
let anjay = [] let anjay = []
...@@ -787,62 +782,51 @@ export default class TaxPlanning extends Component { ...@@ -787,62 +782,51 @@ export default class TaxPlanning extends Component {
} }
}) })
// console.log(baru)
baru.map((item, index) => { baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*') { if (item == '-' || item == '+' || item == '/' || item == '*') {
anjay.push(item) anjay.push(item)
} else { } else {
if (String(item).includes('#')) { if (String(item).includes('#')) {
if (String(item).includes('TP1' || 'TP2' || 'TP3')) {
let splitform = String(item).split('#') let splitform = String(item).split('#')
if (splitform[1] == 'TP1' || splitform[1] == 'TP2' || splitform[1] == 'TP3') {
let indexID = dataTable2.findIndex((val) => val[24] == splitform[0]) let indexID = dataTable2.findIndex((val) => val[24] == splitform[0])
// let valu = dex === 1 ? dataTable2[indexID][tableMeta.columnIndex].tbc : dex === 2 ? dataTable2[indexID][tableMeta.columnIndex].fcp : dataTable2[indexID][tableMeta.columnIndex].tbf
// console.log(index);
// console.log(indexID)
if (indexID !== -1) { if (indexID !== -1) {
// console.log(dataTable2[indexID][tableMeta.columnIndex]) 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 anjay.push(valuezz == "" ? 0 : valuezz)
// console.log(valuezz);
anjay.push(valuezz)
} }
// }
// if (String(item).includes('[M-1]')) {
// let tst = String(item).replace('[M-1]', '')
// let indexID = tableMeta.rowData[18].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == Number(this.props.periode)-1)
// // console.log(indexID)
// if (indexID !== -1) {
// let valuezz = tableMeta.rowData[18].formula[indexID].value
// // baru.push(valuezz)
// anjay.push(valuezz)
// // console.log(valuezz)
// }
} else { } else {
// let splitform = String(item).split('#') if (String(item).includes('[M-1]')) {
// let indexID = dataTable2.findIndex((val) => val[24] == splitform[0]) let tst = String(item).replace('[M-1]', '')
// // let valu = dex === 1 ? dataTable2[indexID][tableMeta.columnIndex].tbc : dex === 2 ? dataTable2[indexID][tableMeta.columnIndex].fcp : dataTable2[indexID][tableMeta.columnIndex].tbf let data = tableMeta.columnIndex == 9? 20 : tableMeta.columnIndex - 1
// // console.log(index); let dataSub = dex == 1? tableMeta.rowData[data].tbc : dex == 2? tableMeta.rowData[data].fcp : tableMeta.rowData[data].tbf
// // console.log(indexID) let period = data == 18? Number(this.props.periode)-1 : this.props.periode
// if (indexID !== -1) { let indexID = dataSub.formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
// // console.log(dataTable2[indexID][tableMeta.columnIndex]) if (indexID !== -1) {
// let data = splitform[1] == 'TP1' ? dataTable2[indexID][tableMeta.columnIndex].tbc : splitform[1] == 'TP2' ? dataTable2[indexID][tableMeta.columnIndex].fcp : dataTable2[indexID][tableMeta.columnIndex].tbf let valuezz = tableMeta.rowData[18].formula[indexID].value
// let valuezz = data anjay.push(valuezz == ""? 0 : valuezz)
// // console.log(valuezz);
// anjay.push(valuezz)
// }
} }
} else { } else {
// console.log(item) let data = dex == 1? value.tbc : dex == 2? value.fcp : value.tbf
// let indexID = dataTable2.findIndex((val) => val[22] == item) let indexID = data.formula.findIndex((val) => val.item_formula == String(`@${item}`))
// // console.log(dataTable2[indexID][tableMeta.columnIndex]) if (indexID !== -1) {
// if (indexID !== -1) { let valuezz = data.formula[indexID].value
// let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value anjay.push(valuezz == ""? 0 : valuezz)
// anjay.push(valuezz) }
// } }
}
} else {
let indexID = dataTable2.findIndex((val) => val[24] == item)
if (indexID !== -1) {
let data = dex == 1? dataTable2[indexID][tableMeta.columnIndex].tbc : dex == 2? dataTable2[indexID][tableMeta.columnIndex].fcp : dataTable2[indexID][tableMeta.columnIndex].tbf
let valuezz = data.value == undefined? data : data.value
anjay.push(valuezz == "" ? 0 : valuezz)
}
} }
} }
}) })
// console.log(anjay)
let total = 0 let total = 0
let opt = "" let opt = ""
anjay.map((item, index) => { anjay.map((item, index) => {
...@@ -869,18 +853,32 @@ export default class TaxPlanning extends Component { ...@@ -869,18 +853,32 @@ export default class TaxPlanning extends Component {
} }
}) })
// console.log(tableMeta.rowData[5]) // console.log(tableMeta.rowData[5])
console.log(baru) // console.log(baru)
console.log(anjay) // console.log(anjay)
console.log(total) console.log(total)
// console.log(splitFormula) // console.log(splitFormula)
// let dataSub = dex == 1? dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc : dex == 2? dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp : dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf
if (dex == 1) {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc = total
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc.value = total
}
} else if (dex == 1) {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp = total
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value = total
}
} else {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = total
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = total
}
}
// if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) { return total
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
// } else {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = total
// }
// return total
} }
const handleChange = (value, tableMeta, indexChilds) => { const handleChange = (value, tableMeta, indexChilds) => {
...@@ -1245,15 +1243,14 @@ export default class TaxPlanning extends Component { ...@@ -1245,15 +1243,14 @@ export default class TaxPlanning extends Component {
/> />
: :
tableMeta.rowData[1] === 5 ? tableMeta.rowData[1] === 5 ?
// <NumberFormat <NumberFormat
// thousandSeparator={true} thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" type="text"
// placeholder="" placeholder=""
// disabled={false} disabled={true}
// value={Number(handleFormula(value, tableMeta, 1, 0)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// /> />
null
: :
tableMeta.rowData[1] === 1 ? tableMeta.rowData[1] === 1 ?
// value[0] === "" ? // value[0] === "" ?
...@@ -1368,26 +1365,24 @@ export default class TaxPlanning extends Component { ...@@ -1368,26 +1365,24 @@ export default class TaxPlanning extends Component {
null null
: :
tableMeta.rowData[2] === 6 ? tableMeta.rowData[2] === 6 ?
// <NumberFormat <NumberFormat
// thousandSeparator={true} thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" type="text"
// placeholder="" placeholder=""
// disabled={true} disabled={true}
// value={Number(handleFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// /> />
null
: :
tableMeta.rowData[2] === 5 ? tableMeta.rowData[2] === 5 ?
// <NumberFormat <NumberFormat
// thousandSeparator={true} thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" type="text"
// placeholder="" placeholder=""
// disabled={true} disabled={true}
// value={Number(handleFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// /> />
null
: :
tableMeta.rowData[2] === 1 ? tableMeta.rowData[2] === 1 ?
// value[1] === "" ? // value[1] === "" ?
...@@ -1517,7 +1512,7 @@ export default class TaxPlanning extends Component { ...@@ -1517,7 +1512,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={false} disabled={false}
value={Number(handleFormula(value, tableMeta, 1, 2)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta,3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 1 ? tableMeta.rowData[3] === 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