Commit 43850742 authored by faisalhamdi's avatar faisalhamdi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into faisal

parents 72095fa1 39af648c
......@@ -271,9 +271,9 @@ const create = (type = "") => {
const getReportFRLastMR = (body) => api.post('/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki', body)
const getReportBSSuma = (body) => api.post('/transaction/summary_balance_sheet/summary/get_report_hierarki', body)
const getDashboardCAT = (body) => api.post('/dashboard/cat', body)
const getHierarkiReportYtd = (body) => api.post('/transaction/summary/ytd/get_report_hierarki', body)
const getHierarkiReportYtd = (body) => api.post('/transaction/summary_ytd/summary/get_report_hierarki', body)
const getHierarkiReportHistorical = (body) => api.post('/transaction/summary_historical/summary/get_report_hierarki', body)
const getHierarkiReportMTD = (body) => api.post('/transaction/summary/mtd/get_report_hierarki', body)
const getHierarkiReportMTD = (body) => api.post('/transaction/summary_mtd/summary/get_report_hierarki', body)
const getFullApproveMB = (body) => api.post('/transaction/master_budget/get_approved_submit', body)
const getFullApproveMonthly = (body) => api.post('/transaction/monthly_report/get_approved_submit', body)
......
......@@ -1794,21 +1794,21 @@ export default class BudgetTahunan extends Component {
listFR.push(
{
"item_report_id": item[1],
"january": String(item[7] == undefined? item[7] : Number(item[7]).toFixed(2)),
"february": String(item[8] == undefined? item[8] : Number(item[8]).toFixed(2)),
"march": String(item[9] == undefined? item[9] : Number(item[9]).toFixed(2)),
"april": String(item[10] == undefined? item[10] : Number(item[10]).toFixed(2)),
"may": String(item[11] == undefined? item[11] : Number(item[11]).toFixed(2)),
"june": String(item[12] == undefined? item[12] : Number(item[12]).toFixed(2)),
"july": String(item[13] == undefined? item[13] : Number(item[13]).toFixed(2)),
"august": String(item[14] == undefined? item[14] : Number(item[14]).toFixed(2)),
"september": String(item[15] == undefined? item[15] : Number(item[15]).toFixed(2)),
"october": String(item[16] == undefined? item[16] : Number(item[16]).toFixed(2)),
"november": String(item[17] == undefined? item[17] : Number(item[17]).toFixed(2)),
"december": String(item[18] == undefined? item[18] : Number(item[18]).toFixed(2)),
"total_current_year": String(totalCY == undefined? totalCY : Number(totalCY).toFixed(2)),
"total_next_year": String(item[19] != ''? Number(item[19]).toFixed(2) : item[19]),
"total_more_year": String(item[20] != ''? Number(item[20]).toFixed(2) : item[20]),
"january": String(item[7] == undefined || item[7] == 'Infinity' || item[7] == '-Infinity'? "0.0" : Number(item[7]).toFixed(2)),
"february": String(item[8] == undefined || item[8] == 'Infinity' || item[8] == '-Infinity'? "0.0" : Number(item[8]).toFixed(2)),
"march": String(item[9] == undefined || item[9] == 'Infinity' || item[9] == '-Infinity'? "0.0" : Number(item[9]).toFixed(2)),
"april": String(item[10] == undefined || item[10] == 'Infinity' || item[10] == '-Infinity'? "0.0" : Number(item[10]).toFixed(2)),
"may": String(item[11] == undefined || item[11] == 'Infinity' || item[11] == '-Infinity'? "0.0" : Number(item[11]).toFixed(2)),
"june": String(item[12] == undefined || item[12] == 'Infinity' || item[12] == '-Infinity'? "0.0" : Number(item[12]).toFixed(2)),
"july": String(item[13] == undefined || item[13] == 'Infinity' || item[13] == '-Infinity'? "0.0" : Number(item[13]).toFixed(2)),
"august": String(item[14] == undefined || item[14] == 'Infinity' || item[14] == '-Infinity'? "0.0" : Number(item[14]).toFixed(2)),
"september": String(item[15] == undefined || item[15] == 'Infinity' || item[15] == '-Infinity'? "0.0" : Number(item[15]).toFixed(2)),
"october": String(item[16] == undefined || item[16] == 'Infinity' || item[16] == '-Infinity'? "0.0" : Number(item[16]).toFixed(2)),
"november": String(item[17] == undefined || item[17] == 'Infinity' || item[17] == '-Infinity'? "0.0" : Number(item[17]).toFixed(2)),
"december": String(item[18] == undefined || item[18] == 'Infinity' || item[18] == '-Infinity'? "0.0" : Number(item[18]).toFixed(2)),
"total_current_year": String(totalCY == undefined || totalCY == 'Infinity' || totalCY == '-Infinity'? "0.0" : Number(totalCY).toFixed(2)),
"total_next_year": String(item[19] != '' || item[19] != 'Infinity' || item[19] != '-Infinity'? Number(item[19]).toFixed(2) : item[19]),
"total_more_year": String(item[20] != '' || item[20] != 'Infinity' || item[20] != '-Infinity'? Number(item[20]).toFixed(2) : item[20]),
}
)
......
......@@ -2006,28 +2006,28 @@ export default class MonthlyReport extends Component {
{
"item_report_id": item[1],
"actual": this.state.month.month_id == 1?
String(item[7] == undefined? item[7] : Number(item[7]).toFixed(2)) :
String(item[7] == undefined || item[7] == 'Infinity' || item[7] == '-Infinity'? "0.0" : Number(item[7]).toFixed(2)) :
this.state.month.month_id == 2?
String(item[8] == undefined? item[8] : Number(item[8]).toFixed(2)) :
String(item[8] == undefined || item[8] == 'Infinity' || item[8] == '-Infinity'? "0.0" : Number(item[8]).toFixed(2)) :
this.state.month.month_id == 3?
String(item[9] == undefined? item[8] : Number(item[9]).toFixed(2)) :
String(item[9] == undefined || item[9] == 'Infinity' || item[9] == '-Infinity'? "0.0" : Number(item[9]).toFixed(2)) :
this.state.month.month_id == 4?
String(item[10] == undefined? item[10] : Number(item[10]).toFixed(2)) :
String(item[10] == undefined || item[10] == 'Infinity' || item[10] == '-Infinity'? "0.0" : Number(item[10]).toFixed(2)) :
this.state.month.month_id == 5?
String(item[11] == undefined? item[11] : Number(item[11]).toFixed(2)) :
String(item[11] == undefined || item[11] == 'Infinity' || item[11] == '-Infinity'? "0.0" : Number(item[11]).toFixed(2)) :
this.state.month.month_id == 6?
String(item[12] == undefined? item[12] : Number(item[12]).toFixed(2)) :
String(item[12] == undefined || item[12] == 'Infinity' || item[12] == '-Infinity'? "0.0" : Number(item[12]).toFixed(2)) :
this.state.month.month_id == 7?
String(item[13] == undefined? item[13] : Number(item[13]).toFixed(2)) :
String(item[13] == undefined || item[13] == 'Infinity' || item[13] == '-Infinity'? "0.0" : Number(item[13]).toFixed(2)) :
this.state.month.month_id == 8?
String(item[14] == undefined? item[14] : Number(item[14]).toFixed(2)) :
String(item[14] == undefined || item[14] == 'Infinity' || item[14] == '-Infinity'? "0.0" : Number(item[14]).toFixed(2)) :
this.state.month.month_id == 9?
String(item[15] == undefined? item[15] : Number(item[15]).toFixed(2)) :
String(item[15] == undefined || item[15] == 'Infinity' || item[15] == '-Infinity'? "0.0" : Number(item[15]).toFixed(2)) :
this.state.month.month_id == 10?
String(item[16] == undefined? item[16] : Number(item[16]).toFixed(2)) :
String(item[16] == undefined || item[16] == 'Infinity' || item[16] == '-Infinity'? "0.0" : Number(item[16]).toFixed(2)) :
this.state.month.month_id == 11?
String(item[17] == undefined? item[17] : Number(item[17]).toFixed(2)) :
String(item[18] == undefined? item[18] : Number(item[18]).toFixed(2))
String(item[17] == undefined || item[17] == 'Infinity' || item[17] == '-Infinity'? "0.0" : Number(item[17]).toFixed(2)) :
String(item[18] == undefined || item[18] == 'Infinity' || item[18] == '-Infinity'? "0.0" : Number(item[18]).toFixed(2))
// "january": String(item[7] == undefined? item[7] : Number(item[7]).toFixed(1)),
// "february": String(item[8] == undefined? item[8] : Number(item[8]).toFixed(1)),
// "march": String(item[9] == undefined? item[9] : Number(item[9]).toFixed(1)),
......
......@@ -23,10 +23,10 @@ export default class SummaryOfTriputra extends Component {
listPeriode: null,
periode: null,
reportType: [
{ value: 1, label: 'MTD Report' },
{ value: 2, label: 'YTD Report' },
{ value: 3, label: 'CPSM Report' },
{ value: 4, label: 'Historical' },
{ value: 1, label: 'MTD Report', key: "MTD" },
{ value: 2, label: 'YTD Report', key: "YTD" },
{ value: 3, label: 'CPSM Report', key: "CPSM" },
{ value: 4, label: 'Historical', key: "historical" },
],
report: null,
loading: false,
......@@ -196,7 +196,7 @@ export default class SummaryOfTriputra extends Component {
getDataTable() {
let payload = {
"report_type": this.state.report.value,
"report_type": this.state.report.key,
"periode": this.state.periode.periode,
"months" : this.state.month.month_id
}
......@@ -205,126 +205,54 @@ export default class SummaryOfTriputra extends Component {
"report_type":"historical"
}
if (this.state.report.value === 1) {
let dbMTD =[]
api.create().getHierarkiReportMTD(payload).then(response => {
console.log(payload);
console.log(response);
// console.log(payload)
// let dataTable = []
let dataTable = []
if (response.data) {
let res = response.data.data
let res = [response.data.data]
const handlePushChild = (item) => {
let indexIDzz = dbMTD.findIndex((val) => val[0] === item.company_id)
let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id)
if (indexIDzz === -1) {
let mtd_revenue_act = item.mtd_revenue_act = '' ? 0 : Number(item.mtd_revenue_act)
let mtd_revenue_mb = item.mtd_revenue_mb = '' ? 0 : Number(item.mtd_revenue_mb)
let persenRevMB = 0
if (mtd_revenue_mb < 0) {
if (mtd_revenue_act >= mtd_revenue_mb) {
persenRevMB = ( mtd_revenue_mb - mtd_revenue_act ) / mtd_revenue_mb + 1
} else {
persenRevMB = ( mtd_revenue_mb - mtd_revenue_act ) / mtd_revenue_mb
}
} else {
persenRevMB = mtd_revenue_act / mtd_revenue_mb
}
let mtd_ebitda_act = item.mtd_ebitda_act = '' ? 0 : Number(item.mtd_ebitda_act)
let mtd_ebitda_mb = item.mtd_ebitda_mb = '' ? 0 : Number(item.mtd_ebitda_mb)
let persenEbitMB = 0
if (mtd_ebitda_mb < 0) {
if (mtd_ebitda_act >= mtd_ebitda_mb) {
persenEbitMB = ( mtd_ebitda_mb - mtd_ebitda_act ) / mtd_ebitda_mb + 1
} else {
persenEbitMB = ( mtd_ebitda_mb - mtd_ebitda_act ) / mtd_ebitda_mb
}
} else {
persenEbitMB = mtd_ebitda_act / mtd_ebitda_mb
}
let mtd_tpat_act = item.mtd_tpat_act = '' ? 0 : Number(item.mtd_tpat_act)
let mtd_tpat_mb = item.mtd_tpat_mb = '' ? 0 : Number(item.mtd_tpat_mb)
let persenTPATMB = 0
if (mtd_tpat_mb < 0) {
if (mtd_tpat_act >= mtd_tpat_mb) {
persenTPATMB = ( mtd_tpat_mb - mtd_tpat_act ) / mtd_tpat_mb + 1
} else {
persenTPATMB = ( mtd_tpat_mb - mtd_tpat_act ) / mtd_tpat_mb
}
} else {
persenTPATMB = mtd_tpat_act / mtd_tpat_mb
}
let mtd_npat_act = item.mtd_npat_act = '' ? 0 : Number(item.mtd_npat_act)
let mtd_npat_mb = item.mtd_npat_mb = '' ? 0 : Number(item.mtd_npat_mb)
let persenNPATMB = 0
if (mtd_npat_mb < 0) {
if (mtd_npat_act >= mtd_npat_mb) {
persenNPATMB = ( mtd_npat_mb - mtd_npat_act ) / mtd_npat_mb + 1
} else {
persenNPATMB = ( mtd_npat_mb - mtd_npat_act ) / mtd_npat_mb
}
} else {
persenNPATMB = mtd_npat_act / mtd_npat_mb
}
let mtd_cf_cfo = item.mtd_cf_cfo = '' ? 0 : Number(item.mtd_cf_cfo)
let mtd_cf_cfi = item.mtd_cf_cfi = '' ? 0 : Number(item.mtd_cf_cfi)
let mtd_cf_cff = item.mtd_cf_cff = '' ? 0 : Number(item.mtd_cf_cff)
let mtd_net_cf = mtd_cf_cfo + mtd_cf_cfi + mtd_cf_cff
let mtd_os_bank_loan_ki = item.mtd_os_bank_loan_ki = '' ? 0 : Number(item.mtd_os_bank_loan_ki)
let mtd_os_bank_loan_wc = item.mtd_os_bank_loan_wc = '' ? 0 : Number(item.mtd_os_bank_loan_wc)
let mtd_os_bank_loan_others = item.mtd_os_bank_loan_others = '' ? 0 : Number(item.mtd_os_bank_loan_others)
let mtd_os_bank_loan_total = mtd_os_bank_loan_ki + mtd_os_bank_loan_wc + mtd_os_bank_loan_others
let mtd_fr_ar_days = item.mtd_fr_ar_days = '' ? 0 : Number(item.mtd_fr_ar_days)
let mtd_fr_inv_days = item.mtd_fr_inv_days = '' ? 0 : Number(item.mtd_fr_inv_days)
let mtd_fr_ap_days = item.mtd_fr_ap_days = '' ? 0 : Number(item.mtd_fr_ap_days)
let mtd_fr_ccc = mtd_fr_ar_days + mtd_fr_inv_days - mtd_fr_ap_days
dbMTD.push([
item.company_id,
dataTable.push([
// item.company_id,
0,
item.parent,
item.level,
item.company_name,
item.mtd_revenue_act,
item.mtd_revenue_mb,
isNaN(persenRevMB) || persenRevMB == 'Infinity' || persenRevMB == '-Infinity'? (item.mtd_revenue_mb == '' || item.mtd_revenue_mb == 0? -0 : 0) : (item.mtd_revenue_mb == '' || item.mtd_revenue_mb == 0? persenRevMB * -100 : persenRevMB * 100),
item.mtd_ebitda_act,
item.mtd_ebitda_mb,
isNaN(persenEbitMB) || persenEbitMB == 'Infinity' || persenEbitMB == '-Infinity'? (item.mtd_ebitda_mb == '' || item.mtd_ebitda_mb == 0? -0 : 0) : (item.mtd_ebitda_mb == '' || item.mtd_ebitda_mb == 0? persenEbitMB * -100 : persenEbitMB * 100),
item.mtd_tpat_act,
item.mtd_tpat_mb,
isNaN(persenTPATMB) || persenTPATMB == 'Infinity' || persenTPATMB == '-Infinity'? (item.mtd_tpat_mb == '' || item.mtd_tpat_mb == 0? -0 : 0) : (item.mtd_tpat_mb == '' || item.mtd_tpat_mb == 0? persenTPATMB * -100 : persenTPATMB * 100),
item.mtd_npat_act,
item.mtd_npat_mb,
isNaN(persenNPATMB) || persenNPATMB == 'Infinity' || persenNPATMB == '-Infinity'? (item.mtd_npat_mb == '' || item.mtd_npat_mb == 0? -0 : 0) : (item.mtd_npat_mb == '' || item.mtd_npat_mb == 0? persenNPATMB * -100 : persenNPATMB * 100),
item.mtd_cf_cfo,
item.mtd_cf_cfi,
item.mtd_cf_cff,
mtd_net_cf,
item.mtd_os_bank_loan_ki,
item.mtd_os_bank_loan_wc,
item.mtd_os_bank_loan_others,
mtd_os_bank_loan_total,
item.mtd_os_shl,
item.mtd_bs_cash_bank,
item.mtd_bs_ca,
item.mtd_bs_cl,
item.mtd_bs_equility,
item.mtd_fr_cr,
item.mtd_fr_der,
item.mtd_fr_debt_ebitda,
item.mtd_fr_interest,
item.mtd_fr_ar_days,
item.mtd_fr_inv_days,
item.mtd_fr_ap_days,
mtd_fr_ccc,
item.item_name,
item.revenue_act,
item.revenue_mb,
item.revenue_percent_of_mb,
item.ebitda_act,
item.ebitda_mb,
item.ebitda_percent_of_mb,
item.tpat_act,
item.tpat_mb,
item.tpat_percent_of_mb,
item.npat_act,
item.npat_mb,
item.npat_percent_of_mb,
item.cash_flow_cfo,
item.cash_flow_cfi,
item.cash_flow_cff,
item.cash_flow_cf,
item.os_bank_loan_ki,
item.os_bank_loan_wc,
item.os_bank_loan_other,
item.os_bank_loan_total,
item.os_shl,
item.balance_sheet_cash_bank,
item.balance_sheet_ca,
item.balance_sheet_cl,
item.balance_sheet_equity,
item.ratio_cr,
item.ratio_der,
item.ratio_debt_to_ebitda,
item.ratio_to_interest,
item.ratio_ar_days,
item.ratio_inv_days,
item.ratio_ap_days,
item.ratio_ccc,
item.order,
])
}
......@@ -337,115 +265,45 @@ export default class SummaryOfTriputra extends Component {
}
}
res.map((item, index) => {
let mtd_revenue_act = item.mtd_revenue_act = '' ? 0 : Number(item.mtd_revenue_act)
let mtd_revenue_mb = item.mtd_revenue_mb = '' ? 0 : Number(item.mtd_revenue_mb)
let persenRevMB = 0
if (mtd_revenue_mb < 0) {
if (mtd_revenue_act >= mtd_revenue_mb) {
persenRevMB = ( mtd_revenue_mb - mtd_revenue_act ) / mtd_revenue_mb + 1
} else {
persenRevMB = ( mtd_revenue_mb - mtd_revenue_act ) / mtd_revenue_mb
}
} else {
persenRevMB = mtd_revenue_act / mtd_revenue_mb
}
let mtd_ebitda_act = item.mtd_ebitda_act = '' ? 0 : Number(item.mtd_ebitda_act)
let mtd_ebitda_mb = item.mtd_ebitda_mb = '' ? 0 : Number(item.mtd_ebitda_mb)
let persenEbitMB = 0
if (mtd_ebitda_mb < 0) {
if (mtd_ebitda_act >= mtd_ebitda_mb) {
persenEbitMB = ( mtd_ebitda_mb - mtd_ebitda_act ) / mtd_ebitda_mb + 1
} else {
persenEbitMB = ( mtd_ebitda_mb - mtd_ebitda_act ) / mtd_ebitda_mb
}
} else {
persenEbitMB = mtd_ebitda_act / mtd_ebitda_mb
}
let mtd_tpat_act = item.mtd_tpat_act = '' ? 0 : Number(item.mtd_tpat_act)
let mtd_tpat_mb = item.mtd_tpat_mb = '' ? 0 : Number(item.mtd_tpat_mb)
let persenTPATMB = 0
if (mtd_tpat_mb < 0) {
if (mtd_tpat_act >= mtd_tpat_mb) {
persenTPATMB = ( mtd_tpat_mb - mtd_tpat_act ) / mtd_tpat_mb + 1
} else {
persenTPATMB = ( mtd_tpat_mb - mtd_tpat_act ) / mtd_tpat_mb
}
} else {
persenTPATMB = mtd_tpat_act / mtd_tpat_mb
}
let mtd_npat_act = item.mtd_npat_act = '' ? 0 : Number(item.mtd_npat_act)
let mtd_npat_mb = item.mtd_npat_mb = '' ? 0 : Number(item.mtd_npat_mb)
let persenNPATMB = 0
if (mtd_npat_mb < 0) {
if (mtd_npat_act >= mtd_npat_mb) {
persenNPATMB = ( mtd_npat_mb - mtd_npat_act ) / mtd_npat_mb + 1
} else {
persenNPATMB = ( mtd_npat_mb - mtd_npat_act ) / mtd_npat_mb
}
} else {
persenNPATMB = mtd_npat_act / mtd_npat_mb
}
let mtd_cf_cfo = item.mtd_cf_cfo = '' ? 0 : Number(item.mtd_cf_cfo)
let mtd_cf_cfi = item.mtd_cf_cfi = '' ? 0 : Number(item.mtd_cf_cfi)
let mtd_cf_cff = item.mtd_cf_cff = '' ? 0 : Number(item.mtd_cf_cff)
let mtd_net_cf = mtd_cf_cfo + mtd_cf_cfi + mtd_cf_cff
let mtd_os_bank_loan_ki = item.mtd_os_bank_loan_ki = '' ? 0 : Number(item.mtd_os_bank_loan_ki)
let mtd_os_bank_loan_wc = item.mtd_os_bank_loan_wc = '' ? 0 : Number(item.mtd_os_bank_loan_wc)
let mtd_os_bank_loan_others = item.mtd_os_bank_loan_others = '' ? 0 : Number(item.mtd_os_bank_loan_others)
let mtd_os_bank_loan_total = mtd_os_bank_loan_ki + mtd_os_bank_loan_wc + mtd_os_bank_loan_others
let mtd_fr_ar_days = item.mtd_fr_ar_days = '' ? 0 : Number(item.mtd_fr_ar_days)
let mtd_fr_inv_days = item.mtd_fr_inv_days = '' ? 0 : Number(item.mtd_fr_inv_days)
let mtd_fr_ap_days = item.mtd_fr_ap_days = '' ? 0 : Number(item.mtd_fr_ap_days)
let mtd_fr_ccc = mtd_fr_ar_days + mtd_fr_inv_days - mtd_fr_ap_days
dbMTD.push([
item.company_id,
dataTable.push([
// item.company_id,
0,
item.parent,
item.level,
item.company_name,
item.mtd_revenue_act,
item.mtd_revenue_mb,
isNaN(persenRevMB) || persenRevMB == 'Infinity' || persenRevMB == '-Infinity'? (item.mtd_revenue_mb == '' || item.mtd_revenue_mb == 0? -0 : 0) : (item.mtd_revenue_mb == '' || item.mtd_revenue_mb == 0? persenRevMB * -100 : persenRevMB * 100),
item.mtd_ebitda_act,
item.mtd_ebitda_mb,
isNaN(persenEbitMB) || persenEbitMB == 'Infinity' || persenEbitMB == '-Infinity'? (item.mtd_ebitda_mb == '' || item.mtd_ebitda_mb == 0? -0 : 0) : (item.mtd_ebitda_mb == '' || item.mtd_ebitda_mb == 0? persenEbitMB * -100 : persenEbitMB * 100),
item.mtd_tpat_act,
item.mtd_tpat_mb,
isNaN(persenTPATMB) || persenTPATMB == 'Infinity' || persenTPATMB == '-Infinity'? (item.mtd_tpat_mb == '' || item.mtd_tpat_mb == 0? -0 : 0) : (item.mtd_tpat_mb == '' || item.mtd_tpat_mb == 0? persenTPATMB * -100 : persenTPATMB * 100),
item.mtd_npat_act,
item.mtd_npat_mb,
isNaN(persenNPATMB) || persenNPATMB == 'Infinity' || persenNPATMB == '-Infinity'? (item.mtd_npat_mb == '' || item.mtd_npat_mb == 0? -0 : 0) : (item.mtd_npat_mb == '' || item.mtd_npat_mb == 0? persenNPATMB * -100 : persenNPATMB * 100),
item.mtd_cf_cfo,
item.mtd_cf_cfi,
item.mtd_cf_cff,
mtd_net_cf,
item.mtd_os_bank_loan_ki,
item.mtd_os_bank_loan_wc,
item.mtd_os_bank_loan_others,
mtd_os_bank_loan_total,
item.mtd_os_shl,
item.mtd_bs_cash_bank,
item.mtd_bs_ca,
item.mtd_bs_cl,
item.mtd_bs_equility,
item.mtd_fr_cr,
item.mtd_fr_der,
item.mtd_fr_debt_ebitda,
item.mtd_fr_interest,
item.mtd_fr_ar_days,
item.mtd_fr_inv_days,
item.mtd_fr_ap_days,
mtd_fr_ccc,
item.item_name,
item.revenue_act,
item.revenue_mb,
item.revenue_percent_of_mb,
item.ebitda_act,
item.ebitda_mb,
item.ebitda_percent_of_mb,
item.tpat_act,
item.tpat_mb,
item.tpat_percent_of_mb,
item.npat_act,
item.npat_mb,
item.npat_percent_of_mb,
item.cash_flow_cfo,
item.cash_flow_cfi,
item.cash_flow_cff,
item.cash_flow_cf,
item.os_bank_loan_ki,
item.os_bank_loan_wc,
item.os_bank_loan_other,
item.os_bank_loan_total,
item.os_shl,
item.balance_sheet_cash_bank,
item.balance_sheet_ca,
item.balance_sheet_cl,
item.balance_sheet_equity,
item.ratio_cr,
item.ratio_der,
item.ratio_debt_to_ebitda,
item.ratio_to_interest,
item.ratio_ar_days,
item.ratio_inv_days,
item.ratio_ap_days,
item.ratio_ccc,
item.order,
])
if (item.children !== null) {
......@@ -456,8 +314,8 @@ export default class SummaryOfTriputra extends Component {
}
}
})
console.log(dbMTD)
this.setState({ dataTable: dbMTD, previewTable: true, loading: false, previewDownload: true })
console.log(dataTable)
this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
} else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
}
......@@ -468,7 +326,7 @@ export default class SummaryOfTriputra extends Component {
console.log(response);
let dataTable = []
if (response.data) {
let res = response.data.data
let res = [response.data.data]
const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id)
if (indexIDzz === -1) {
......@@ -677,66 +535,67 @@ export default class SummaryOfTriputra extends Component {
}
dataTable.push([
item.company_id,
// item.company_id,
0,
item.parent,
item.level,
item.company_name,
item.item_name,
item.revenue_ytd_act,
item.revenue_ytd_mb,
// item.revenue_ytd_percent_of_mb,
isNaN(revenueYtdPersenMB) || revenueYtdPersenMB == 'Infinity' || revenueYtdPersenMB == '-Infinity' ? ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? -0 : 0 ) : ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? Number(revenueYtdPersenMB) * Number(-100) : Number(revenueYtdPersenMB) * Number(100) ),
item.revenue_ytd_percent_of_mb,
// isNaN(revenueYtdPersenMB) || revenueYtdPersenMB == 'Infinity' || revenueYtdPersenMB == '-Infinity' ? ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? -0 : 0 ) : ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? Number(revenueYtdPersenMB) * Number(-100) : Number(revenueYtdPersenMB) * Number(100) ),
item.revenue_ytd_last_year,
// item.revenue_ytd_percent_of_last_year,
isNaN(revenueYtdPersenLY) || revenueYtdPersenLY == 'Infinity' || revenueYtdPersenLY == '-Infinity' ? ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? -0 : 0 ) : ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? Number(revenueYtdPersenLY) * Number(-100) : Number(revenueYtdPersenLY) * Number(100) ),
item.revenue_ytd_percent_of_last_year,
// isNaN(revenueYtdPersenLY) || revenueYtdPersenLY == 'Infinity' || revenueYtdPersenLY == '-Infinity' ? ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? -0 : 0 ) : ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? Number(revenueYtdPersenLY) * Number(-100) : Number(revenueYtdPersenLY) * Number(100) ),
item.revenue_fy_ol,
item.revenue_fy_mb,
// item.revenue_fy_percent_of_mb,
isNaN(revenueFyPersenMB) || revenueFyPersenMB == 'Infinity' || revenueFyPersenMB == '-Infinity' ? ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? -0 : 0 ) : ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? Number(revenueFyPersenMB) * Number(-100) : Number(revenueFyPersenMB) * Number(100) ),
item.revenue_fy_percent_of_mb,
// isNaN(revenueFyPersenMB) || revenueFyPersenMB == 'Infinity' || revenueFyPersenMB == '-Infinity' ? ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? -0 : 0 ) : ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? Number(revenueFyPersenMB) * Number(-100) : Number(revenueFyPersenMB) * Number(100) ),
item.revenue_fy_last_year,
// item.revenue_fy_percent_of_last_year,
isNaN(revenueFyPersenLY) || revenueFyPersenLY == 'Infinity' || revenueFyPersenLY == '-Infinity' ? ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? -0 : 0 ) : ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? Number(revenueFyPersenLY) * Number(-100) : Number(revenueFyPersenLY) * Number(100) ),
item.revenue_fy_percent_of_last_year,
// isNaN(revenueFyPersenLY) || revenueFyPersenLY == 'Infinity' || revenueFyPersenLY == '-Infinity' ? ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? -0 : 0 ) : ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? Number(revenueFyPersenLY) * Number(-100) : Number(revenueFyPersenLY) * Number(100) ),
item.ebitda_ytd_act,
item.ebitda_ytd_mb,
// item.ebitda_ytd_percent_of_mb,
isNaN(ebitdaYtdPersenMB) || ebitdaYtdPersenMB == 'Infinity' || ebitdaYtdPersenMB == '-Infinity' ? ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? -0 : 0 ) : ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? Number(ebitdaYtdPersenMB) * Number(-100) : Number(ebitdaYtdPersenMB) * Number(100) ),
item.ebitda_ytd_percent_of_mb,
// isNaN(ebitdaYtdPersenMB) || ebitdaYtdPersenMB == 'Infinity' || ebitdaYtdPersenMB == '-Infinity' ? ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? -0 : 0 ) : ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? Number(ebitdaYtdPersenMB) * Number(-100) : Number(ebitdaYtdPersenMB) * Number(100) ),
item.ebitda_ytd_last_year,
// item.ebitda_ytd_percent_of_last_year,
isNaN(ebitdaYtdPersenLY) || ebitdaYtdPersenLY == 'Infinity' || ebitdaYtdPersenLY == '-Infinity' ? ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? -0 : 0 ) : ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? Number(ebitdaYtdPersenLY) * Number(-100) : Number(ebitdaYtdPersenLY) * Number(100) ),
item.ebitda_ytd_percent_of_last_year,
// isNaN(ebitdaYtdPersenLY) || ebitdaYtdPersenLY == 'Infinity' || ebitdaYtdPersenLY == '-Infinity' ? ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? -0 : 0 ) : ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? Number(ebitdaYtdPersenLY) * Number(-100) : Number(ebitdaYtdPersenLY) * Number(100) ),
item.ebitda_fy_ol,
item.ebitda_fy_mb,
// item.ebitda_fy_percent_of_mb,
isNaN(ebitdaFyPersenMB) || ebitdaFyPersenMB == 'Infinity' || ebitdaFyPersenMB == '-Infinity' ? ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? -0 : 0 ) : ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? Number(ebitdaFyPersenMB) * Number(-100) : Number(ebitdaFyPersenMB) * Number(100) ),
item.ebitda_fy_percent_of_mb,
// isNaN(ebitdaFyPersenMB) || ebitdaFyPersenMB == 'Infinity' || ebitdaFyPersenMB == '-Infinity' ? ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? -0 : 0 ) : ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? Number(ebitdaFyPersenMB) * Number(-100) : Number(ebitdaFyPersenMB) * Number(100) ),
item.ebitda_fy_last_year,
// item.ebitda_fy_percent_of_last_year,
isNaN(ebitdaFyPersenLY) || ebitdaFyPersenLY == 'Infinity' || ebitdaFyPersenLY == '-Infinity' ? ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? -0 : 0 ) : ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? Number(ebitdaFyPersenLY) * Number(-100) : Number(ebitdaFyPersenLY) * Number(100) ),
item.ebitda_fy_percent_of_last_year,
// isNaN(ebitdaFyPersenLY) || ebitdaFyPersenLY == 'Infinity' || ebitdaFyPersenLY == '-Infinity' ? ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? -0 : 0 ) : ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? Number(ebitdaFyPersenLY) * Number(-100) : Number(ebitdaFyPersenLY) * Number(100) ),
item.tpat_ytd_act,
item.tpat_ytd_mb,
// item.tpat_ytd_percent_of_mb,
isNaN(tpatYtdPersenMB) || tpatYtdPersenMB == 'Infinity' || tpatYtdPersenMB == '-Infinity' ? ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? -0 : 0 ) : ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? Number(tpatYtdPersenMB) * Number(-100) : Number(tpatYtdPersenMB) * Number(100) ),
item.tpat_ytd_percent_of_mb,
// isNaN(tpatYtdPersenMB) || tpatYtdPersenMB == 'Infinity' || tpatYtdPersenMB == '-Infinity' ? ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? -0 : 0 ) : ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? Number(tpatYtdPersenMB) * Number(-100) : Number(tpatYtdPersenMB) * Number(100) ),
item.tpat_ytd_last_year,
// item.tpat_ytd_percent_of_last_year,
isNaN(tpatYtdPersenLY) || tpatYtdPersenLY == 'Infinity' || tpatYtdPersenLY == '-Infinity' ? ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? -0 : 0 ) : ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? Number(tpatYtdPersenLY) * Number(-100) : Number(tpatYtdPersenLY) * Number(100) ),
item.tpat_ytd_percent_of_last_year,
// isNaN(tpatYtdPersenLY) || tpatYtdPersenLY == 'Infinity' || tpatYtdPersenLY == '-Infinity' ? ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? -0 : 0 ) : ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? Number(tpatYtdPersenLY) * Number(-100) : Number(tpatYtdPersenLY) * Number(100) ),
item.tpat_fy_ol,
item.tpat_fy_mb,
// item.tpat_fy_percent_of_mb,
isNaN(tpatFyPersenMB) || tpatFyPersenMB == 'Infinity' || tpatFyPersenMB == '-Infinity' ? ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? -0 : 0 ) : ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? Number(tpatFyPersenMB) * Number(-100) : Number(tpatFyPersenMB) * Number(100) ),
item.tpat_fy_percent_of_mb,
// isNaN(tpatFyPersenMB) || tpatFyPersenMB == 'Infinity' || tpatFyPersenMB == '-Infinity' ? ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? -0 : 0 ) : ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? Number(tpatFyPersenMB) * Number(-100) : Number(tpatFyPersenMB) * Number(100) ),
item.tpat_fy_last_year,
// item.tpat_fy_percent_of_last_year,
isNaN(tpatFyPersenLY) || tpatFyPersenLY == 'Infinity' || tpatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(tpatFyPersenLY) * Number(-100) : Number(tpatFyPersenLY) * Number(100) ),
item.tpat_fy_percent_of_last_year,
// isNaN(tpatFyPersenLY) || tpatFyPersenLY == 'Infinity' || tpatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(tpatFyPersenLY) * Number(-100) : Number(tpatFyPersenLY) * Number(100) ),
item.npat_ytd_act,
item.npat_ytd_mb,
// item.npat_ytd_percent_of_mb,
isNaN(npatYtdPersenMB) || npatYtdPersenMB == 'Infinity' || npatYtdPersenMB == '-Infinity' ? ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? -0 : 0 ) : ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? Number(npatYtdPersenMB) * Number(-100) : Number(npatYtdPersenMB) * Number(100) ),
item.npat_ytd_percent_of_mb,
// isNaN(npatYtdPersenMB) || npatYtdPersenMB == 'Infinity' || npatYtdPersenMB == '-Infinity' ? ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? -0 : 0 ) : ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? Number(npatYtdPersenMB) * Number(-100) : Number(npatYtdPersenMB) * Number(100) ),
item.npat_ytd_last_year,
// item.npat_ytd_percent_of_last_year,
isNaN(npatYtdPersenLY) || npatYtdPersenLY == 'Infinity' || npatYtdPersenLY == '-Infinity' ? ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? -0 : 0 ) : ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? Number(npatYtdPersenLY) * Number(-100) : Number(npatYtdPersenLY) * Number(100) ),
item.npat_ytd_percent_of_last_year,
// isNaN(npatYtdPersenLY) || npatYtdPersenLY == 'Infinity' || npatYtdPersenLY == '-Infinity' ? ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? -0 : 0 ) : ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? Number(npatYtdPersenLY) * Number(-100) : Number(npatYtdPersenLY) * Number(100) ),
item.npat_fy_ol,
item.npat_fy_mb,
// item.npat_fy_percent_of_mb,
isNaN(npatFyPersenMB) || npatFyPersenMB == 'Infinity' || npatFyPersenMB == '-Infinity' ? ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? -0 : 0 ) : ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? Number(npatFyPersenMB) * Number(-100) : Number(npatFyPersenMB) * Number(100) ),
item.npat_fy_percent_of_mb,
// isNaN(npatFyPersenMB) || npatFyPersenMB == 'Infinity' || npatFyPersenMB == '-Infinity' ? ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? -0 : 0 ) : ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? Number(npatFyPersenMB) * Number(-100) : Number(npatFyPersenMB) * Number(100) ),
item.npat_fy_last_year,
// item.npat_fy_percent_of_last_year,
isNaN(npatFyPersenLY) || npatFyPersenLY == 'Infinity' || npatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(npatFyPersenLY) * Number(-100) : Number(npatFyPersenLY) * Number(100) ),
item.npat_fy_percent_of_last_year,
// isNaN(npatFyPersenLY) || npatFyPersenLY == 'Infinity' || npatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(npatFyPersenLY) * Number(-100) : Number(npatFyPersenLY) * Number(100) ),
item.order,
])
}
......@@ -954,66 +813,67 @@ export default class SummaryOfTriputra extends Component {
}
dataTable.push([
item.company_id,
// item.company_id,
0,
item.parent,
item.level,
item.company_name,
item.item_name,
item.revenue_ytd_act,
item.revenue_ytd_mb,
// item.revenue_ytd_percent_of_mb,
isNaN(revenueYtdPersenMB) || revenueYtdPersenMB == 'Infinity' || revenueYtdPersenMB == '-Infinity' ? ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? -0 : 0 ) : ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? Number(revenueYtdPersenMB) * Number(-100) : Number(revenueYtdPersenMB) * Number(100) ),
item.revenue_ytd_percent_of_mb,
// isNaN(revenueYtdPersenMB) || revenueYtdPersenMB == 'Infinity' || revenueYtdPersenMB == '-Infinity' ? ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? -0 : 0 ) : ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? Number(revenueYtdPersenMB) * Number(-100) : Number(revenueYtdPersenMB) * Number(100) ),
item.revenue_ytd_last_year,
// item.revenue_ytd_percent_of_last_year,
isNaN(revenueYtdPersenLY) || revenueYtdPersenLY == 'Infinity' || revenueYtdPersenLY == '-Infinity' ? ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? -0 : 0 ) : ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? Number(revenueYtdPersenLY) * Number(-100) : Number(revenueYtdPersenLY) * Number(100) ),
item.revenue_ytd_percent_of_last_year,
// isNaN(revenueYtdPersenLY) || revenueYtdPersenLY == 'Infinity' || revenueYtdPersenLY == '-Infinity' ? ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? -0 : 0 ) : ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? Number(revenueYtdPersenLY) * Number(-100) : Number(revenueYtdPersenLY) * Number(100) ),
item.revenue_fy_ol,
item.revenue_fy_mb,
// item.revenue_fy_percent_of_mb,
isNaN(revenueFyPersenMB) || revenueFyPersenMB == 'Infinity' || revenueFyPersenMB == '-Infinity' ? ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? -0 : 0 ) : ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? Number(revenueFyPersenMB) * Number(-100) : Number(revenueFyPersenMB) * Number(100) ),
item.revenue_fy_percent_of_mb,
// isNaN(revenueFyPersenMB) || revenueFyPersenMB == 'Infinity' || revenueFyPersenMB == '-Infinity' ? ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? -0 : 0 ) : ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? Number(revenueFyPersenMB) * Number(-100) : Number(revenueFyPersenMB) * Number(100) ),
item.revenue_fy_last_year,
// item.revenue_fy_percent_of_last_year,
isNaN(revenueFyPersenLY) || revenueFyPersenLY == 'Infinity' || revenueFyPersenLY == '-Infinity' ? ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? -0 : 0 ) : ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? Number(revenueFyPersenLY) * Number(-100) : Number(revenueFyPersenLY) * Number(100) ),
item.revenue_fy_percent_of_last_year,
// isNaN(revenueFyPersenLY) || revenueFyPersenLY == 'Infinity' || revenueFyPersenLY == '-Infinity' ? ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? -0 : 0 ) : ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? Number(revenueFyPersenLY) * Number(-100) : Number(revenueFyPersenLY) * Number(100) ),
item.ebitda_ytd_act,
item.ebitda_ytd_mb,
// item.ebitda_ytd_percent_of_mb,
isNaN(ebitdaYtdPersenMB) || ebitdaYtdPersenMB == 'Infinity' || ebitdaYtdPersenMB == '-Infinity' ? ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? -0 : 0 ) : ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? Number(ebitdaYtdPersenMB) * Number(-100) : Number(ebitdaYtdPersenMB) * Number(100) ),
item.ebitda_ytd_percent_of_mb,
// isNaN(ebitdaYtdPersenMB) || ebitdaYtdPersenMB == 'Infinity' || ebitdaYtdPersenMB == '-Infinity' ? ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? -0 : 0 ) : ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? Number(ebitdaYtdPersenMB) * Number(-100) : Number(ebitdaYtdPersenMB) * Number(100) ),
item.ebitda_ytd_last_year,
// item.ebitda_ytd_percent_of_last_year,
isNaN(ebitdaYtdPersenLY) || ebitdaYtdPersenLY == 'Infinity' || ebitdaYtdPersenLY == '-Infinity' ? ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? -0 : 0 ) : ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? Number(ebitdaYtdPersenLY) * Number(-100) : Number(ebitdaYtdPersenLY) * Number(100) ),
item.ebitda_ytd_percent_of_last_year,
// isNaN(ebitdaYtdPersenLY) || ebitdaYtdPersenLY == 'Infinity' || ebitdaYtdPersenLY == '-Infinity' ? ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? -0 : 0 ) : ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? Number(ebitdaYtdPersenLY) * Number(-100) : Number(ebitdaYtdPersenLY) * Number(100) ),
item.ebitda_fy_ol,
item.ebitda_fy_mb,
// item.ebitda_fy_percent_of_mb,
isNaN(ebitdaFyPersenMB) || ebitdaFyPersenMB == 'Infinity' || ebitdaFyPersenMB == '-Infinity' ? ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? -0 : 0 ) : ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? Number(ebitdaFyPersenMB) * Number(-100) : Number(ebitdaFyPersenMB) * Number(100) ),
item.ebitda_fy_percent_of_mb,
// isNaN(ebitdaFyPersenMB) || ebitdaFyPersenMB == 'Infinity' || ebitdaFyPersenMB == '-Infinity' ? ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? -0 : 0 ) : ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? Number(ebitdaFyPersenMB) * Number(-100) : Number(ebitdaFyPersenMB) * Number(100) ),
item.ebitda_fy_last_year,
// item.ebitda_fy_percent_of_last_year,
isNaN(ebitdaFyPersenLY) || ebitdaFyPersenLY == 'Infinity' || ebitdaFyPersenLY == '-Infinity' ? ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? -0 : 0 ) : ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? Number(ebitdaFyPersenLY) * Number(-100) : Number(ebitdaFyPersenLY) * Number(100) ),
item.ebitda_fy_percent_of_last_year,
// isNaN(ebitdaFyPersenLY) || ebitdaFyPersenLY == 'Infinity' || ebitdaFyPersenLY == '-Infinity' ? ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? -0 : 0 ) : ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? Number(ebitdaFyPersenLY) * Number(-100) : Number(ebitdaFyPersenLY) * Number(100) ),
item.tpat_ytd_act,
item.tpat_ytd_mb,
// item.tpat_ytd_percent_of_mb,
isNaN(tpatYtdPersenMB) || tpatYtdPersenMB == 'Infinity' || tpatYtdPersenMB == '-Infinity' ? ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? -0 : 0 ) : ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? Number(tpatYtdPersenMB) * Number(-100) : Number(tpatYtdPersenMB) * Number(100) ),
item.tpat_ytd_percent_of_mb,
// isNaN(tpatYtdPersenMB) || tpatYtdPersenMB == 'Infinity' || tpatYtdPersenMB == '-Infinity' ? ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? -0 : 0 ) : ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? Number(tpatYtdPersenMB) * Number(-100) : Number(tpatYtdPersenMB) * Number(100) ),
item.tpat_ytd_last_year,
// item.tpat_ytd_percent_of_last_year,
isNaN(tpatYtdPersenLY) || tpatYtdPersenLY == 'Infinity' || tpatYtdPersenLY == '-Infinity' ? ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? -0 : 0 ) : ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? Number(tpatYtdPersenLY) * Number(-100) : Number(tpatYtdPersenLY) * Number(100) ),
item.tpat_ytd_percent_of_last_year,
// isNaN(tpatYtdPersenLY) || tpatYtdPersenLY == 'Infinity' || tpatYtdPersenLY == '-Infinity' ? ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? -0 : 0 ) : ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? Number(tpatYtdPersenLY) * Number(-100) : Number(tpatYtdPersenLY) * Number(100) ),
item.tpat_fy_ol,
item.tpat_fy_mb,
// item.tpat_fy_percent_of_mb,
isNaN(tpatFyPersenMB) || tpatFyPersenMB == 'Infinity' || tpatFyPersenMB == '-Infinity' ? ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? -0 : 0 ) : ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? Number(tpatFyPersenMB) * Number(-100) : Number(tpatFyPersenMB) * Number(100) ),
item.tpat_fy_percent_of_mb,
// isNaN(tpatFyPersenMB) || tpatFyPersenMB == 'Infinity' || tpatFyPersenMB == '-Infinity' ? ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? -0 : 0 ) : ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? Number(tpatFyPersenMB) * Number(-100) : Number(tpatFyPersenMB) * Number(100) ),
item.tpat_fy_last_year,
// item.tpat_fy_percent_of_last_year,
isNaN(tpatFyPersenLY) || tpatFyPersenLY == 'Infinity' || tpatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(tpatFyPersenLY) * Number(-100) : Number(tpatFyPersenLY) * Number(100) ),
item.tpat_fy_percent_of_last_year,
// isNaN(tpatFyPersenLY) || tpatFyPersenLY == 'Infinity' || tpatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(tpatFyPersenLY) * Number(-100) : Number(tpatFyPersenLY) * Number(100) ),
item.npat_ytd_act,
item.npat_ytd_mb,
// item.npat_ytd_percent_of_mb,
isNaN(npatYtdPersenMB) || npatYtdPersenMB == 'Infinity' || npatYtdPersenMB == '-Infinity' ? ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? -0 : 0 ) : ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? Number(npatYtdPersenMB) * Number(-100) : Number(npatYtdPersenMB) * Number(100) ),
item.npat_ytd_percent_of_mb,
// isNaN(npatYtdPersenMB) || npatYtdPersenMB == 'Infinity' || npatYtdPersenMB == '-Infinity' ? ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? -0 : 0 ) : ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? Number(npatYtdPersenMB) * Number(-100) : Number(npatYtdPersenMB) * Number(100) ),
item.npat_ytd_last_year,
// item.npat_ytd_percent_of_last_year,
isNaN(npatYtdPersenLY) || npatYtdPersenLY == 'Infinity' || npatYtdPersenLY == '-Infinity' ? ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? -0 : 0 ) : ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? Number(npatYtdPersenLY) * Number(-100) : Number(npatYtdPersenLY) * Number(100) ),
item.npat_ytd_percent_of_last_year,
// isNaN(npatYtdPersenLY) || npatYtdPersenLY == 'Infinity' || npatYtdPersenLY == '-Infinity' ? ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? -0 : 0 ) : ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? Number(npatYtdPersenLY) * Number(-100) : Number(npatYtdPersenLY) * Number(100) ),
item.npat_fy_ol,
item.npat_fy_mb,
// item.npat_fy_percent_of_mb,
isNaN(npatFyPersenMB) || npatFyPersenMB == 'Infinity' || npatFyPersenMB == '-Infinity' ? ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? -0 : 0 ) : ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? Number(npatFyPersenMB) * Number(-100) : Number(npatFyPersenMB) * Number(100) ),
item.npat_fy_percent_of_mb,
// isNaN(npatFyPersenMB) || npatFyPersenMB == 'Infinity' || npatFyPersenMB == '-Infinity' ? ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? -0 : 0 ) : ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? Number(npatFyPersenMB) * Number(-100) : Number(npatFyPersenMB) * Number(100) ),
item.npat_fy_last_year,
// item.npat_fy_percent_of_last_year,
isNaN(npatFyPersenLY) || npatFyPersenLY == 'Infinity' || npatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(npatFyPersenLY) * Number(-100) : Number(npatFyPersenLY) * Number(100) ),
item.npat_fy_percent_of_last_year,
// isNaN(npatFyPersenLY) || npatFyPersenLY == 'Infinity' || npatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(npatFyPersenLY) * Number(-100) : Number(npatFyPersenLY) * Number(100) ),
item.order,
])
if (item.children !== null) {
......
......@@ -80,7 +80,7 @@ export default class TableSummaryTriputra extends Component {
name: `MTD 2021`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, backgroundColor: '#1c71b8', top: 0, color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-4x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#07a7d0', height: 65 }}>
......@@ -168,7 +168,6 @@ export default class TableSummaryTriputra extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
decimalScale={1}
disabled={true}
value={Number(tableMeta.rowData[4]).toFixed(1)}
/>
......@@ -187,7 +186,6 @@ export default class TableSummaryTriputra extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
decimalScale={1}
disabled={true}
value={Number(tableMeta.rowData[5]).toFixed(1)}
/>
......@@ -206,9 +204,9 @@ export default class TableSummaryTriputra extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[6]).toFixed(2)}
suffix={'%'}
value={tableMeta.rowData[6]}
/>
}
/>
......@@ -269,7 +267,7 @@ export default class TableSummaryTriputra extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(2)}
value={tableMeta.rowData[9]}
/>
}
/>
......@@ -330,7 +328,7 @@ export default class TableSummaryTriputra extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(2)}
value={tableMeta.rowData[12]}
/>
}
/>
......@@ -391,7 +389,7 @@ export default class TableSummaryTriputra extends Component {
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(2)}
value={tableMeta.rowData[15]}
/>
}
/>
......@@ -468,7 +466,7 @@ export default class TableSummaryTriputra extends Component {
name: `MTD 2021 (OPTIONAL)`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, backgroundColor: '#1c71b8', top: 0, color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="column-5" style={{ ...style2, display: 'flex', backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#07a7d0', height: 65, width: 685 }}>
......@@ -1041,26 +1039,6 @@ export default class TableSummaryTriputra extends Component {
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}
]
......@@ -1217,7 +1195,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6]).toFixed(1)}
value={tableMeta.rowData[6]}
/>
}
/>
......@@ -1249,7 +1227,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
value={tableMeta.rowData[8]}
/>
}
/>
......@@ -1299,7 +1277,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)}
value={tableMeta.rowData[11]}
/>
}
/>
......@@ -1333,7 +1311,7 @@ export default class TableSummaryTriputra extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)}
value={tableMeta.rowData[13]}
/>
}
/>
......
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