Commit fc4f963a authored by Deni Rinaldi's avatar Deni Rinaldi

isu tpat pl

parent ccc58a9f
...@@ -122,18 +122,18 @@ export default class ProfitLoss extends Component { ...@@ -122,18 +122,18 @@ export default class ProfitLoss extends Component {
item.description, item.description,
item.profit_loss.notes === "" ? null : item.profit_loss.notes, item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.total_actual_before === null ? "0" : item.profit_loss.total_actual_before === "" ? "0" : item.profit_loss.total_actual_before, item.profit_loss.total_actual_before === null ? "0" : item.profit_loss.total_actual_before === "" ? "0" : item.profit_loss.total_actual_before,
this.props.status === 'CLOSED' ? Number(item.profit_loss.january).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.january, formula: item.profit_loss.january_formula } : Number(item.profit_loss.january).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.january).toFixed(1) : Number(item.profit_loss.january).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.february).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.february, formula: item.profit_loss.february_formula } : Number(item.profit_loss.february).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.february).toFixed(1) : Number(item.profit_loss.february).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.march).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.march, formula: item.profit_loss.march_formula } : Number(item.profit_loss.march).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.march).toFixed(1) : Number(item.profit_loss.march).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.april).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.april, formula: item.profit_loss.april_formula } : Number(item.profit_loss.april).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.april).toFixed(1) : Number(item.profit_loss.april).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.may).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.may, formula: item.profit_loss.may_formula } : Number(item.profit_loss.may).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.may).toFixed(1) : Number(item.profit_loss.may).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.june).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.june, formula: item.profit_loss.june_formula } : Number(item.profit_loss.june).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.june).toFixed(1) : Number(item.profit_loss.june).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.july).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.july, formula: item.profit_loss.july_formula } : Number(item.profit_loss.july).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.july).toFixed(1) : Number(item.profit_loss.july).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.august).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.august, formula: item.profit_loss.august_formula } : Number(item.profit_loss.august).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.august).toFixed(1) : Number(item.profit_loss.august).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.september).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.september, formula: item.profit_loss.september_formula } : Number(item.profit_loss.september).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.september).toFixed(1) : Number(item.profit_loss.september).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.october).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.october, formula: item.profit_loss.october_formula } : Number(item.profit_loss.october).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.october).toFixed(1) : Number(item.profit_loss.october).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.november).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.november, formula: item.profit_loss.november_formula } : Number(item.profit_loss.november).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.november).toFixed(1) : Number(item.profit_loss.november).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.december, formula: item.profit_loss.december_formula } : Number(item.profit_loss.december).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.december).toFixed(1) : Number(item.profit_loss.december).toFixed(1),
item.profit_loss.total_current_year, item.profit_loss.total_current_year,
item.profit_loss.total_next_year, item.profit_loss.total_next_year,
item.profit_loss.total_more_year, item.profit_loss.total_more_year,
...@@ -158,18 +158,18 @@ export default class ProfitLoss extends Component { ...@@ -158,18 +158,18 @@ export default class ProfitLoss extends Component {
item.description, item.description,
item.profit_loss.notes === "" ? null : item.profit_loss.notes, item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.total_actual_before === null ? "0" : item.profit_loss.total_actual_before === "" ? "0" : item.profit_loss.total_actual_before, item.profit_loss.total_actual_before === null ? "0" : item.profit_loss.total_actual_before === "" ? "0" : item.profit_loss.total_actual_before,
this.props.status === 'CLOSED' ? Number(item.profit_loss.january).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.january, formula: item.profit_loss.january_formula } : Number(item.profit_loss.january).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.january).toFixed(1) : Number(item.profit_loss.january).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.february).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.february, formula: item.profit_loss.february_formula } : Number(item.profit_loss.february).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.february).toFixed(1) : Number(item.profit_loss.february).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.march).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.march, formula: item.profit_loss.march_formula } : Number(item.profit_loss.march).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.march).toFixed(1) : Number(item.profit_loss.march).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.april).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.april, formula: item.profit_loss.april_formula } : Number(item.profit_loss.april).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.april).toFixed(1) : Number(item.profit_loss.april).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.may).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.may, formula: item.profit_loss.may_formula } : Number(item.profit_loss.may).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.may).toFixed(1) : Number(item.profit_loss.may).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.june).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.june, formula: item.profit_loss.june_formula } : Number(item.profit_loss.june).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.june).toFixed(1) : Number(item.profit_loss.june).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.july).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.july, formula: item.profit_loss.july_formula } : Number(item.profit_loss.july).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.july).toFixed(1) : Number(item.profit_loss.july).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.august).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.august, formula: item.profit_loss.august_formula } : Number(item.profit_loss.august).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.august).toFixed(1) : Number(item.profit_loss.august).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.september).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.september, formula: item.profit_loss.september_formula } : Number(item.profit_loss.september).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.september).toFixed(1) : Number(item.profit_loss.september).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.october).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.october, formula: item.profit_loss.october_formula } : Number(item.profit_loss.october).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.october).toFixed(1) : Number(item.profit_loss.october).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.november).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.november, formula: item.profit_loss.november_formula } : Number(item.profit_loss.november).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.november).toFixed(1) : Number(item.profit_loss.november).toFixed(1),
this.props.status === 'CLOSED' ? Number(item.profit_loss.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.profit_loss.december, formula: item.profit_loss.december_formula } : Number(item.profit_loss.december).toFixed(1), this.props.status === 'CLOSED' ? Number(item.profit_loss.december).toFixed(1) : Number(item.profit_loss.december).toFixed(1),
item.profit_loss.total_current_year, item.profit_loss.total_current_year,
item.profit_loss.total_next_year, item.profit_loss.total_next_year,
item.profit_loss.total_more_year, item.profit_loss.total_more_year,
...@@ -564,7 +564,7 @@ export default class ProfitLoss extends Component { ...@@ -564,7 +564,7 @@ export default class ProfitLoss extends Component {
let opet = "" let opet = ""
arrayFormula.map((item, indexs) => { arrayFormula.map((item, indexs) => {
if (item == 'X') { if (item == 'X') {
tambahan = true tambahan = true
} else if (item == '-' || item == '+' || item == '/' || item == '*') { } else if (item == '-' || item == '+' || item == '/' || item == '*') {
arrayJumlah.push(item) arrayJumlah.push(item)
} else { } else {
...@@ -588,9 +588,10 @@ export default class ProfitLoss extends Component { ...@@ -588,9 +588,10 @@ export default class ProfitLoss extends Component {
// operator.push(item) // operator.push(item)
// } // }
}) })
// if (String(tableMeta.rowData[5]) == "Unit Business/ Brand/ SubCo 1") { // if (String(tableMeta.rowData[5]) == "Net Trading Profit (TPAT)") {
// console.log(arrayFormula) // console.log(tableMeta.rowData[3])
// console.log(arrayJumlah) // console.log(arrayFormula)
// console.log(arrayJumlah)
// } // }
let array = arrayJumlah let array = arrayJumlah
......
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