mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Format numbers and currencies in payment XLSX
This commit is contained in:
@@ -30,19 +30,19 @@ export const generateCustomerPaymentExcel = (
|
||||
'Tanggal Realisasi': item.realization_date
|
||||
? formatDate(item.realization_date, 'DD MMM YYYY')
|
||||
: '',
|
||||
Aging: item.aging || 0,
|
||||
Aging: formatNumber(item.aging || 0),
|
||||
Referensi: item.reference || '',
|
||||
'Nomor Polisi': item.vehicle_plate || '',
|
||||
'Ekor/Qty': item.qty || 0,
|
||||
'Berat (Kg)': item.weight || 0,
|
||||
AVG: item.average_weight || 0,
|
||||
'Harga Awal': item.price || 0,
|
||||
CN: item.credit_note || 0,
|
||||
'Harga Akhir': item.final_price || 0,
|
||||
'PPN (%)': item.ppn || 0,
|
||||
Total: item.total || 0,
|
||||
Pembayaran: item.payment || 0,
|
||||
'Saldo Piutang': item.accounts_receivable || 0,
|
||||
'Ekor/Qty': formatNumber(item.qty || 0),
|
||||
'Berat (Kg)': formatNumber(item.weight || 0),
|
||||
AVG: formatNumber(item.average_weight || 0),
|
||||
'Harga Awal': formatCurrency(item.price || 0),
|
||||
CN: formatCurrency(item.credit_note || 0),
|
||||
'Harga Akhir': formatCurrency(item.final_price || 0),
|
||||
'PPN (%)': formatNumber(item.ppn || 0),
|
||||
Total: formatCurrency(item.total || 0),
|
||||
Pembayaran: formatCurrency(item.payment || 0),
|
||||
'Saldo Piutang': formatCurrency(item.accounts_receivable || 0),
|
||||
Keterangan: item.notes || '',
|
||||
Pengambilan: item.pickup_info || '',
|
||||
'Sales/Marketing': item.sales_marketing || '',
|
||||
@@ -57,16 +57,22 @@ export const generateCustomerPaymentExcel = (
|
||||
Aging: '',
|
||||
Referensi: '',
|
||||
'Nomor Polisi': '',
|
||||
'Ekor/Qty': customerReport.summary.total_qty || 0,
|
||||
'Berat (Kg)': customerReport.summary.total_weight || 0,
|
||||
'Ekor/Qty': formatNumber(customerReport.summary.total_qty || 0),
|
||||
'Berat (Kg)': formatNumber(customerReport.summary.total_weight || 0),
|
||||
AVG: '',
|
||||
'Harga Awal': customerReport.summary.total_initial_amount || 0,
|
||||
CN: customerReport.summary.total_credit_note || 0,
|
||||
'Harga Akhir': customerReport.summary.total_final_amount || 0,
|
||||
'Harga Awal': formatCurrency(
|
||||
customerReport.summary.total_initial_amount || 0
|
||||
),
|
||||
CN: formatCurrency(customerReport.summary.total_credit_note || 0),
|
||||
'Harga Akhir': formatCurrency(
|
||||
customerReport.summary.total_final_amount || 0
|
||||
),
|
||||
'PPN (%)': '',
|
||||
Total: customerReport.summary.total_grand_amount || 0,
|
||||
Pembayaran: customerReport.summary.total_payment || 0,
|
||||
'Saldo Piutang': customerReport.summary.total_accounts_receivable || 0,
|
||||
Total: formatCurrency(customerReport.summary.total_grand_amount || 0),
|
||||
Pembayaran: formatCurrency(customerReport.summary.total_payment || 0),
|
||||
'Saldo Piutang': formatCurrency(
|
||||
customerReport.summary.total_accounts_receivable || 0
|
||||
),
|
||||
Keterangan: '',
|
||||
Pengambilan: '',
|
||||
'Sales/Marketing': '',
|
||||
|
||||
Reference in New Issue
Block a user