Commit a17c50f4 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

ro & olpa upload tp

See merge request !1291
parents e15ac065 9b42aa4d
...@@ -255,6 +255,7 @@ const create = (type = "") => { ...@@ -255,6 +255,7 @@ const create = (type = "") => {
const createRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/create_rolling_outlook', body) const createRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/create_rolling_outlook', body)
const getRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/get_report_hierarki', body) const getRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/get_report_hierarki', body)
const getRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/get_report_hierarki', body) const getRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/get_report_hierarki', body)
const createRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/store_ro_tax_planning', body)
//REPORT NEW //REPORT NEW
...@@ -710,6 +711,7 @@ const create = (type = "") => { ...@@ -710,6 +711,7 @@ const create = (type = "") => {
getRollingOutlookBS, getRollingOutlookBS,
createRollingOutlookBS, createRollingOutlookBS,
getRollingOutlookTP, getRollingOutlookTP,
createRollingOutlookTP,
getAllMasterDataCat, getAllMasterDataCat,
getParentItemReport, getParentItemReport,
saveMasterDataCat, saveMasterDataCat,
......
...@@ -397,7 +397,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -397,7 +397,7 @@ export default class TaxPlanningOLPA extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp) console.log(resp)
if (err) { if (err) {
// console.log(err); // console.log(err);
} }
...@@ -413,75 +413,75 @@ export default class TaxPlanningOLPA extends Component { ...@@ -413,75 +413,75 @@ export default class TaxPlanningOLPA extends Component {
item_report_id: i[0] === undefined ? "" : String(i[0]).trim(), item_report_id: i[0] === undefined ? "" : String(i[0]).trim(),
item_report: i[1] === undefined ? "" : String(i[1]).trim(), item_report: i[1] === undefined ? "" : String(i[1]).trim(),
january: { january: {
tbc: i[2] === undefined ? "0" : reg.test(String(i[2])) === false ? "0" : String(i[2]).trim(), // tbc: i[2] === undefined ? "0" : reg.test(String(i[2])) === false ? "0" : String(i[2]).trim(),
fcp: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[3]).trim(), // fcp: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[3]).trim(),
tbf: i[4] === undefined ? "0" : reg.test(String(i[4])) === false ? "0" : String(i[4]).trim(), tbf: i[2] === undefined ? "0" : reg.test(String(i[2])) === false ? "0" : String(i[2]).trim(),
}, },
february: { february: {
tbc: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(), // tbc: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(),
fcp: i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[6]).trim(), // fcp: i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[6]).trim(),
tbf: i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[7]).trim(), tbf: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[3]).trim(),
}, },
march: { march: {
tbc: i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim(), // tbc: i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim(),
fcp: i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim(), // fcp: i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim(),
tbf: i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[10]).trim(), tbf: i[4] === undefined ? "0" : reg.test(String(i[4])) === false ? "0" : String(i[4]).trim(),
}, },
april: { april: {
tbc: i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim(), // tbc: i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim(),
fcp: i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim(), // fcp: i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim(),
tbf: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[13]).trim(), tbf: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(),
}, },
may: { may: {
tbc: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(), // tbc: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(),
fcp: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim(), // fcp: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim(),
tbf: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim(), tbf: i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[6]).trim(),
}, },
june: { june: {
tbc: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(), // tbc: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(),
fcp: i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim(), // fcp: i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim(),
tbf: i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[19]).trim(), tbf: i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[7]).trim(),
}, },
july: { july: {
tbc: i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(), // tbc: i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(),
fcp: i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim(), // fcp: i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim(),
tbf: i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[22]).trim(), tbf: i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim(),
}, },
august: { august: {
tbc: i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim(), // tbc: i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim(),
fcp: i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[24]).trim(), // fcp: i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[24]).trim(),
tbf: i[25] === undefined ? "0" : reg.test(String(i[25])) === false ? "0" : String(i[25]).trim(), tbf: i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim(),
}, },
september: { september: {
tbc: i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim(), // tbc: i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim(),
fcp: i[27] === undefined ? "0" : reg.test(String(i[27])) === false ? "0" : String(i[27]).trim(), // fcp: i[27] === undefined ? "0" : reg.test(String(i[27])) === false ? "0" : String(i[27]).trim(),
tbf: i[28] === undefined ? "0" : reg.test(String(i[28])) === false ? "0" : String(i[28]).trim(), tbf: i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[10]).trim(),
}, },
october: { october: {
tbc: i[29] === undefined ? "0" : reg.test(String(i[29])) === false ? "0" : String(i[29]).trim(), // tbc: i[29] === undefined ? "0" : reg.test(String(i[29])) === false ? "0" : String(i[29]).trim(),
fcp: i[30] === undefined ? "0" : reg.test(String(i[30])) === false ? "0" : String(i[30]).trim(), // fcp: i[30] === undefined ? "0" : reg.test(String(i[30])) === false ? "0" : String(i[30]).trim(),
tbf: i[31] === undefined ? "0" : reg.test(String(i[31])) === false ? "0" : String(i[31]).trim(), tbf: i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim(),
}, },
november: { november: {
tbc: i[32] === undefined ? "0" : reg.test(String(i[32])) === false ? "0" : String(i[32]).trim(), tbc: i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim(),
fcp: i[33] === undefined ? "0" : reg.test(String(i[33])) === false ? "0" : String(i[33]).trim(), fcp: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[13]).trim(),
tbf: i[34] === undefined ? "0" : reg.test(String(i[34])) === false ? "0" : String(i[34]).trim(), tbf: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(),
}, },
december: { december: {
tbc: i[35] === undefined ? "0" : reg.test(String(i[35])) === false ? "0" : String(i[35]).trim(), tbc: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim(),
fcp: i[36] === undefined ? "0" : reg.test(String(i[36])) === false ? "0" : String(i[36]).trim(), fcp: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim(),
tbf: i[37] === undefined ? "0" : reg.test(String(i[37])) === false ? "0" : String(i[37]).trim(), tbf: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(),
}, },
total_current_year: i[38] === undefined ? "" : String(i[38]).trim(), total_current_year: i[18] === undefined ? "" : String(i[18]).trim(),
total_next_year: { total_next_year: {
tbc: i[39] === undefined ? "0" : reg.test(String(i[39])) === false ? "0" : String(i[39]).trim(), tbc: i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[19]).trim(),
fcp: i[40] === undefined ? "0" : reg.test(String(i[40])) === false ? "0" : String(i[40]).trim(), fcp: i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(),
tbf: i[41] === undefined ? "0" : reg.test(String(i[41])) === false ? "0" : String(i[41]).trim(), tbf: i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim(),
}, },
total_more_year: { total_more_year: {
tbc: i[42] === undefined ? "0" : reg.test(String(i[42])) === false ? "0" : String(i[42]).trim(), tbc: i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[22]).trim(),
fcp: i[43] === undefined ? "0" : reg.test(String(i[43])) === false ? "0" : String(i[43]).trim(), fcp: i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim(),
tbf: i[44] === undefined ? "0" : reg.test(String(i[44])) === false ? "0" : String(i[44]).trim(), tbf: i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[24]).trim(),
} }
}) })
} }
...@@ -518,44 +518,44 @@ export default class TaxPlanningOLPA extends Component { ...@@ -518,44 +518,44 @@ export default class TaxPlanningOLPA extends Component {
// {tbc: item.formula.tbc, fcp: item.formula.fcp, tbf: item.formula.tbf}, // {tbc: item.formula.tbc, fcp: item.formula.fcp, tbf: item.formula.tbf},
item.level, item.level,
item.item_report, item.item_report,
{ tbc: Number(item.type_report_id.tbc) === 3 && item.january.tbc === "" ? "0" : item.january.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.january.fcp === "" ? "0" : item.january.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.january.tbf === "" ? "0" : item.january.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.january.tbf === "" ? "0" : item.january.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.february.tbc === "" ? "0" : item.february.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.february.fcp === "" ? "0" : item.february.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.february.tbf === "" ? "0" : item.february.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.february.tbf === "" ? "0" : item.february.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.march.tbc === "" ? "0" : item.march.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.march.fcp === "" ? "0" : item.march.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.march.tbf === "" ? "0" : item.march.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.march.tbf === "" ? "0" : item.march.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.april.tbc === "" ? "0" : item.april.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.april.fcp === "" ? "0" : item.april.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.april.tbf === "" ? "0" : item.april.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.april.tbf === "" ? "0" : item.april.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.may.tbc === "" ? "0" : item.may.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.may.fcp === "" ? "0" : item.may.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.may.tbf === "" ? "0" : item.may.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.may.tbf === "" ? "0" : item.may.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.june.tbc === "" ? "0" : item.june.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.june.fcp === "" ? "0" : item.june.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.june.tbf === "" ? "0" : item.june.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.june.tbf === "" ? "0" : item.june.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.july.tbc === "" ? "0" : item.july.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.july.fcp === "" ? "0" : item.july.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.july.tbf === "" ? "0" : item.july.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.july.tbf === "" ? "0" : item.july.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.august.tbc === "" ? "0" : item.august.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.august.fcp === "" ? "0" : item.august.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.august.tbf === "" ? "0" : item.august.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.august.tbf === "" ? "0" : item.august.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.september.tbc === "" ? "0" : item.september.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.september.fcp === "" ? "0" : item.september.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.september.tbf === "" ? "0" : item.september.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.september.tbf === "" ? "0" : item.september.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.october.tbc === "" ? "0" : item.october.tbc, { tbc: 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.october.fcp === "" ? "0" : item.october.fcp, fcp: 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.october.tbf === "" ? "0" : item.october.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.october.tbf === "" ? "0" : item.october.tbf
}, },
{ tbc: Number(item.type_report_id.tbc) === 3 && item.november.tbc === "" ? "0" : item.november.tbc, { tbc: Number(item.type_report_id.tbc) === 3 && item.november.tbc === "" ? "0" : item.november.tbc,
...@@ -567,26 +567,20 @@ export default class TaxPlanningOLPA extends Component { ...@@ -567,26 +567,20 @@ export default class TaxPlanningOLPA extends Component {
tbf: Number(item.type_report_id.tbf) === 3 && item.december.tbf === "" ? "0" : item.december.tbf tbf: Number(item.type_report_id.tbf) === 3 && item.december.tbf === "" ? "0" : item.december.tbf
}, },
item.total_current_year, item.total_current_year,
{ tbc: Number(item.type_report_id.tbc) === 3 && item.total_next_year.tbc === "" ? "0" : item.total_next_year.tbc, 0,
fcp: Number(item.type_report_id.fcp) === 3 && item.total_next_year.fcp === "" ? "0" : item.total_next_year.fcp, 0,
tbf: Number(item.type_report_id.tbf) === 3 && item.total_next_year.tbf === "" ? "0" : item.total_next_year.tbf
},
{ tbc: Number(item.type_report_id.tbc) === 3 && item.total_more_year.tbc === "" ? "0" : item.total_more_year.tbc,
fcp: Number(item.type_report_id.fcp) === 3 && item.total_more_year.fcp === "" ? "0" : item.total_more_year.fcp,
tbf: Number(item.type_report_id.tbf) === 3 && item.total_more_year.tbf === "" ? "0" : item.total_more_year.tbf
},
item.orders, item.orders,
item.error item.error
] ]
}) })
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => { // this.state.dataTable.map(item => {
if (item[25].length > 0) { // if (item[25].length > 0) {
// console.log('masuk') // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) // this.setState({ buttonError: true, errorPreview: true, editable: true })
} // }
}) // })
// console.log(this.state.dataTable); console.log(this.state.dataTable);
}) })
} }
} }
...@@ -599,53 +593,53 @@ export default class TaxPlanningOLPA extends Component { ...@@ -599,53 +593,53 @@ export default class TaxPlanningOLPA extends Component {
data.push({ data.push({
item_report_id: i[4], item_report_id: i[4],
january: { january: {
tbc: String(Number(i[9].tbc).toFixed(1)), // tbc: String(Number(i[9].tbc).toFixed(1)),
fcp: String(Number(i[9].fcp).toFixed(1)), // fcp: String(Number(i[9].fcp).toFixed(1)),
tbf: String(Number(i[9].tbf).toFixed(1)) tbf: String(Number(i[9].tbf).toFixed(1))
}, },
february: { february: {
tbc: String(Number(i[10].tbc).toFixed(1)), // tbc: String(Number(i[10].tbc).toFixed(1)),
fcp: String(Number(i[10].fcp).toFixed(1)), // fcp: String(Number(i[10].fcp).toFixed(1)),
tbf: String(Number(i[10].tbf).toFixed(1)) tbf: String(Number(i[10].tbf).toFixed(1))
}, },
march: { march: {
tbc: String(Number(i[11].tbc).toFixed(1)), // tbc: String(Number(i[11].tbc).toFixed(1)),
fcp: String(Number(i[11].fcp).toFixed(1)), // fcp: String(Number(i[11].fcp).toFixed(1)),
tbf: String(Number(i[11].tbf).toFixed(1)) tbf: String(Number(i[11].tbf).toFixed(1))
}, },
april: { april: {
tbc: String(Number(i[12].tbc).toFixed(1)), // tbc: String(Number(i[12].tbc).toFixed(1)),
fcp: String(Number(i[12].fcp).toFixed(1)), // fcp: String(Number(i[12].fcp).toFixed(1)),
tbf: String(Number(i[12].tbf).toFixed(1)) tbf: String(Number(i[12].tbf).toFixed(1))
}, },
may: { may: {
tbc: String(Number(i[13].tbc).toFixed(1)), // tbc: String(Number(i[13].tbc).toFixed(1)),
fcp: String(Number(i[13].fcp).toFixed(1)), // fcp: String(Number(i[13].fcp).toFixed(1)),
tbf: String(Number(i[13].tbf).toFixed(1)) tbf: String(Number(i[13].tbf).toFixed(1))
}, },
june: { june: {
tbc: String(Number(i[14].tbc).toFixed(1)), // tbc: String(Number(i[14].tbc).toFixed(1)),
fcp: String(Number(i[14].fcp).toFixed(1)), // fcp: String(Number(i[14].fcp).toFixed(1)),
tbf: String(Number(i[14].tbf).toFixed(1)) tbf: String(Number(i[14].tbf).toFixed(1))
}, },
july: { july: {
tbc: String(Number(i[15].tbc).toFixed(1)), // tbc: String(Number(i[15].tbc).toFixed(1)),
fcp: String(Number(i[15].fcp).toFixed(1)), // fcp: String(Number(i[15].fcp).toFixed(1)),
tbf: String(Number(i[15].tbf).toFixed(1)) tbf: String(Number(i[15].tbf).toFixed(1))
}, },
august: { august: {
tbc: String(Number(i[16].tbc).toFixed(1)), // tbc: String(Number(i[16].tbc).toFixed(1)),
fcp: String(Number(i[16].fcp).toFixed(1)), // fcp: String(Number(i[16].fcp).toFixed(1)),
tbf: String(Number(i[16].tbf).toFixed(1)) tbf: String(Number(i[16].tbf).toFixed(1))
}, },
september: { september: {
tbc: String(Number(i[17].tbc).toFixed(1)), // tbc: String(Number(i[17].tbc).toFixed(1)),
fcp: String(Number(i[17].fcp).toFixed(1)), // fcp: String(Number(i[17].fcp).toFixed(1)),
tbf: String(Number(i[17].tbf).toFixed(1)) tbf: String(Number(i[17].tbf).toFixed(1))
}, },
october: { october: {
tbc: String(Number(i[18].tbc).toFixed(1)), // tbc: String(Number(i[18].tbc).toFixed(1)),
fcp: String(Number(i[18].fcp).toFixed(1)), // fcp: String(Number(i[18].fcp).toFixed(1)),
tbf: String(Number(i[18].tbf).toFixed(1)) tbf: String(Number(i[18].tbf).toFixed(1))
}, },
november: { november: {
...@@ -658,17 +652,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -658,17 +652,7 @@ export default class TaxPlanningOLPA extends Component {
fcp: String(Number(i[20].fcp).toFixed(1)), fcp: String(Number(i[20].fcp).toFixed(1)),
tbf: String(Number(i[20].tbf).toFixed(1)) tbf: String(Number(i[20].tbf).toFixed(1))
}, },
total_current_year: String(Number(i[21]).toFixed(1)), total_current_year: String(Number(i[21]).toFixed(1))
total_next_year: {
tbc: String(Number(i[22].tbc).toFixed(1)),
fcp: String(Number(i[22].fcp).toFixed(1)),
tbf: String(Number(i[22].tbf).toFixed(1))
},
total_more_year: {
tbc: String(Number(i[23].tbc).toFixed(1)),
fcp: String(Number(i[23].fcp).toFixed(1)),
tbf: String(Number(i[23].tbf).toFixed(1))
}
}) })
}) })
let body = { let body = {
......
...@@ -66,25 +66,25 @@ export default class TaxPlanning extends Component { ...@@ -66,25 +66,25 @@ export default class TaxPlanning extends Component {
componentDidMount() { componentDidMount() {
// this.getLatestUpdate() // this.getLatestUpdate()
this.getSettingControl() this.getSettingControl()
console.log(this.props.isApprover); console.log(this.props.quarter);
} }
getSettingControl() { getSettingControl() {
let body = { // let body = {
group: 'THRESHOLD_CONTROL', // group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id, // company_id: this.props.company.company_id,
type: 'TAX_PLANNING' // type: 'TAX_PLANNING'
} // }
api.create().getAllSettingByType(body).then(response => { // api.create().getAllSettingByType(body).then(response => {
console.log(response); // console.log(response);
this.setState({ // this.setState({
minValue: response.data.data[0] ? response.data.data[0].min_value : null, // minValue: response.data.data[0] ? response.data.data[0].min_value : null,
maxValue: response.data.data[0] ? response.data.data[0].max_value : null, // maxValue: response.data.data[0] ? response.data.data[0].max_value : null,
}, () => { // }, () => {
this.getItemHierarki() this.getItemHierarki()
}) // })
}) // })
} }
getLatestUpdate() { getLatestUpdate() {
...@@ -284,22 +284,23 @@ export default class TaxPlanning extends Component { ...@@ -284,22 +284,23 @@ export default class TaxPlanning extends Component {
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
item_report_id: i[4], item_report_id: i[4],
january: { rotp_detail_id : null,
jan: {
tbc: i[1] === 3 && i[9].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[9].tbc.value) : String(i[9].tbc), tbc: i[1] === 3 && i[9].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[9].tbc.value) : String(i[9].tbc),
fcp: i[2] === 3 && i[9].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[9].fcp.value) : String(i[9].fcp), fcp: i[2] === 3 && i[9].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[9].fcp.value) : String(i[9].fcp),
tbf: i[3] === 3 && i[9].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[9].tbf.value) : String(i[9].tbf) tbf: i[3] === 3 && i[9].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[9].tbf.value) : String(i[9].tbf)
}, },
february: { feb: {
tbc: i[1] === 3 && i[10].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[10].tbc.value) : String(i[10].tbc), tbc: i[1] === 3 && i[10].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[10].tbc.value) : String(i[10].tbc),
fcp: i[2] === 3 && i[10].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[10].fcp.value) : String(i[10].fcp), fcp: i[2] === 3 && i[10].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[10].fcp.value) : String(i[10].fcp),
tbf: i[3] === 3 && i[10].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[10].tbf.value) : String(i[10].tbf) tbf: i[3] === 3 && i[10].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[10].tbf.value) : String(i[10].tbf)
}, },
march: { mar: {
tbc: i[1] === 3 && i[11].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[11].tbc.value) : String(i[11].tbc), tbc: i[1] === 3 && i[11].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[11].tbc.value) : String(i[11].tbc),
fcp: i[2] === 3 && i[11].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[11].fcp.value) : String(i[11].fcp), fcp: i[2] === 3 && i[11].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[11].fcp.value) : String(i[11].fcp),
tbf: i[3] === 3 && i[11].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[11].tbf.value) : String(i[11].tbf) tbf: i[3] === 3 && i[11].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[11].tbf.value) : String(i[11].tbf)
}, },
april: { apr: {
tbc: i[1] === 3 && i[12].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[12].tbc.value) : String(i[12].tbc), tbc: i[1] === 3 && i[12].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[12].tbc.value) : String(i[12].tbc),
fcp: i[2] === 3 && i[12].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[12].fcp.value) : String(i[12].fcp), fcp: i[2] === 3 && i[12].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[12].fcp.value) : String(i[12].fcp),
tbf: i[3] === 3 && i[12].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[12].tbf.value) : String(i[12].tbf) tbf: i[3] === 3 && i[12].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[12].tbf.value) : String(i[12].tbf)
...@@ -309,67 +310,91 @@ export default class TaxPlanning extends Component { ...@@ -309,67 +310,91 @@ export default class TaxPlanning extends Component {
fcp: i[2] === 3 && i[13].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[13].fcp.value) : String(i[13].fcp), fcp: i[2] === 3 && i[13].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[13].fcp.value) : String(i[13].fcp),
tbf: i[3] === 3 && i[13].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[13].tbf.value) : String(i[13].tbf) tbf: i[3] === 3 && i[13].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[13].tbf.value) : String(i[13].tbf)
}, },
june: { jun: {
tbc: i[1] === 3 && i[14].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[14].tbc.value) : String(i[14].tbc), tbc: i[1] === 3 && i[14].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[14].tbc.value) : String(i[14].tbc),
fcp: i[2] === 3 && i[14].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[14].fcp.value) : String(i[14].fcp), fcp: i[2] === 3 && i[14].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[14].fcp.value) : String(i[14].fcp),
tbf: i[3] === 3 && i[14].tbc === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[14].tbf.value) : String(i[14].tbf) tbf: i[3] === 3 && i[14].tbc === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[14].tbf.value) : String(i[14].tbf)
}, },
july: { jul: {
tbc: i[1] === 3 && i[15].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[15].tbc.value) : String(i[15].tbc), tbc: i[1] === 3 && i[15].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[15].tbc.value) : String(i[15].tbc),
fcp: i[2] === 3 && i[15].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[15].fcp.value) : String(i[15].fcp), fcp: i[2] === 3 && i[15].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[15].fcp.value) : String(i[15].fcp),
tbf: i[3] === 3 && i[15].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[15].tbf.value) : String(i[15].tbf) tbf: i[3] === 3 && i[15].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[15].tbf.value) : String(i[15].tbf)
}, },
august: { aug: {
tbc: i[1] === 3 && i[16].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[16].tbc.value) : String(i[16].tbc), tbc: i[1] === 3 && i[16].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[16].tbc.value) : String(i[16].tbc),
fcp: i[2] === 3 && i[16].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[16].fcp.value) : String(i[16].fcp), fcp: i[2] === 3 && i[16].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[16].fcp.value) : String(i[16].fcp),
tbf: i[3] === 3 && i[16].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[16].tbf.value) : String(i[16].tbf) tbf: i[3] === 3 && i[16].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[16].tbf.value) : String(i[16].tbf)
}, },
september: { sep: {
tbc: i[1] === 3 && i[17].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[17].tbc.value) : String(i[17].tbc), tbc: i[1] === 3 && i[17].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[17].tbc.value) : String(i[17].tbc),
fcp: i[2] === 3 && i[17].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[17].fcp.value) : String(i[17].fcp), fcp: i[2] === 3 && i[17].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[17].fcp.value) : String(i[17].fcp),
tbf: i[3] === 3 && i[17].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[17].tbf.value) : String(i[17].tbf) tbf: i[3] === 3 && i[17].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[17].tbf.value) : String(i[17].tbf)
}, },
october: { oct: {
tbc: i[1] === 3 && i[18].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[18].tbc.value) : String(i[18].tbc), tbc: i[1] === 3 && i[18].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[18].tbc.value) : String(i[18].tbc),
fcp: i[2] === 3 && i[18].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[18].fcp.value) : String(i[18].fcp), fcp: i[2] === 3 && i[18].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[18].fcp.value) : String(i[18].fcp),
tbf: i[3] === 3 && i[18].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[18].tbf.value) : String(i[18].tbf) tbf: i[3] === 3 && i[18].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[18].tbf.value) : String(i[18].tbf)
}, },
november: { nop: {
tbc: i[1] === 3 && i[19].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[19].tbc.value) : String(i[19].tbc), tbc: i[1] === 3 && i[19].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[19].tbc.value) : String(i[19].tbc),
fcp: i[2] === 3 && i[19].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[19].fcp.value) : String(i[19].fcp), fcp: i[2] === 3 && i[19].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[19].fcp.value) : String(i[19].fcp),
tbf: i[3] === 3 && i[19].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[19].tbf.value) : String(i[19].tbf) tbf: i[3] === 3 && i[19].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[19].tbf.value) : String(i[19].tbf)
}, },
december: { dec: {
tbc: i[1] === 3 && i[20].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[20].tbc.value) : String(i[20].tbc), tbc: i[1] === 3 && i[20].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[20].tbc.value) : String(i[20].tbc),
fcp: i[2] === 3 && i[20].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[20].fcp.value) : String(i[20].fcp), fcp: i[2] === 3 && i[20].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[20].fcp.value) : String(i[20].fcp),
tbf: i[3] === 3 && i[20].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[20].tbf.value) : String(i[20].tbf) tbf: i[3] === 3 && i[20].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[20].tbf.value) : String(i[20].tbf)
}, },
total_current_year: String(Number(i[21]).toFixed(1)), tb_total: String(Number(i[21]).toFixed(1)),
total_next_year: { // total_next_year: {
tbc: String(Number(i[22].tbc).toFixed(1)), // tbc: String(Number(i[22].tbc).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].fcp).toFixed(1)) : String(Number(i[22].fcp).toFixed(1)), // fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[22].fcp).toFixed(1)) : String(Number(i[22].fcp).toFixed(1)),
// fcp: String(Number(i[22].fcp).toFixed(1)), // // fcp: String(Number(i[22].fcp).toFixed(1)),
tbf: String(Number(i[22].tbf).toFixed(1)) // tbf: String(Number(i[22].tbf).toFixed(1))
}, // },
total_more_year: { // total_more_year: {
tbc: String(Number(i[23].tbc).toFixed(1)), // tbc: String(Number(i[23].tbc).toFixed(1)),
fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].fcp).toFixed(1)) : String(Number(i[23].fcp).toFixed(1)), // fcp: String(i[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(i[23].fcp).toFixed(1)) : String(Number(i[23].fcp).toFixed(1)),
// fcp: String(Number(i[23].fcp).toFixed(1)), // // fcp: String(Number(i[23].fcp).toFixed(1)),
tbf: String(Number(i[23].tbf).toFixed(1)) // tbf: String(Number(i[23].tbf).toFixed(1))
} // }
}) })
}) })
let payload = { let payload = {
"submission_id": this.props.submissionID, "rolling_outlook_id": this.props.rollingOutlookID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"periode": this.props.periode, "periode": this.props.periode,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"status": type, "status": type,
"tax_planning": data "revision": 0,
"raw": data
}
// this.props.saveToMasterBudget(payload)
// this.props.onClickClose()
api.create('UPLOAD').createRollingOutlookTP(payload).then(response => {
console.log(payload);
console.log(response);
if (response.data) {
if (response.data.status === "success") {
// this.props.saveToMonthlyReport()
this.props.onClickClose()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
} }
// console.log(payload); // this.props.saveToMonthlyReport()
this.props.saveToMasterBudget(payload)
this.props.onClickClose() this.props.onClickClose()
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
} }
fileHandler = (event) => { fileHandler = (event) => {
...@@ -753,7 +778,8 @@ export default class TaxPlanning extends Component { ...@@ -753,7 +778,8 @@ export default class TaxPlanning extends Component {
downloadTemplate = async () => { downloadTemplate = async () => {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` // `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/rolling_outlook/tax_planning/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -761,7 +787,7 @@ export default class TaxPlanning extends Component { ...@@ -761,7 +787,7 @@ export default class TaxPlanning extends Component {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
a.download = 'Template Master Budget Tax Planning.xlsx'; a.download = 'Template Rolling Outlook Tax Planning.xlsx';
a.click(); a.click();
} }
} }
...@@ -779,7 +805,7 @@ export default class TaxPlanning extends Component { ...@@ -779,7 +805,7 @@ export default class TaxPlanning extends Component {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
a.download = 'Master Budget Tax Planning.xlsx'; a.download = 'Rolling Outlook Tax Planning.xlsx';
a.click(); a.click();
} }
} }
...@@ -1041,8 +1067,9 @@ export default class TaxPlanning extends Component { ...@@ -1041,8 +1067,9 @@ export default class TaxPlanning extends Component {
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
} }
} else { } else {
console.log(value);
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);
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
...@@ -1382,7 +1409,7 @@ export default class TaxPlanning extends Component { ...@@ -1382,7 +1409,7 @@ export default class TaxPlanning extends Component {
<div className=""> <div className="">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ?
null null
: :
this.state.get_for == 'view' ? this.state.get_for == 'view' ?
...@@ -1392,7 +1419,7 @@ export default class TaxPlanning extends Component { ...@@ -1392,7 +1419,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(444).toFixed(1)} value={Number(value.tbf).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 3 ? tableMeta.rowData[3] === 3 ?
...@@ -1819,7 +1846,7 @@ export default class TaxPlanning extends Component { ...@@ -1819,7 +1846,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1?
null null
: :
this.state.get_for == 'view' ? this.state.get_for == 'view' ?
...@@ -1936,7 +1963,7 @@ export default class TaxPlanning extends Component { ...@@ -1936,7 +1963,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1?
null null
: :
this.state.get_for == 'view' ? this.state.get_for == 'view' ?
...@@ -1949,7 +1976,7 @@ export default class TaxPlanning extends Component { ...@@ -1949,7 +1976,7 @@ export default class TaxPlanning extends Component {
value={Number(value.fcp).toFixed(1)} value={Number(value.fcp).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 3 ? tableMeta.rowData[2] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1971,7 +1998,7 @@ export default class TaxPlanning extends Component { ...@@ -1971,7 +1998,7 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[2] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2073,7 +2100,7 @@ export default class TaxPlanning extends Component { ...@@ -2073,7 +2100,7 @@ export default class TaxPlanning extends Component {
<div className="col-3"> <div className="col-3">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ?
null null
: :
this.state.get_for == 'view' ? this.state.get_for == 'view' ?
...@@ -5481,7 +5508,7 @@ export default class TaxPlanning extends Component { ...@@ -5481,7 +5508,7 @@ export default class TaxPlanning extends Component {
return ( return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}> <div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Master Budget Submission</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Rolling Outlook Submission</Typography>
</div> </div>
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}> <Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}> <Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
...@@ -5493,7 +5520,7 @@ export default class TaxPlanning extends Component { ...@@ -5493,7 +5520,7 @@ export default class TaxPlanning extends Component {
{this.state.visibleTP === true ? {this.state.visibleTP === true ?
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}> <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Master Budget - Tax Planning</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Rolling Outlook - Tax Planning</Typography>
</div> </div>
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
......
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