{formatCurrency(customerReport.summary.total_grand_amount)}
diff --git a/src/components/pages/report/finance/export/CustomerPaymentExportXLSX.tsx b/src/components/pages/report/finance/export/CustomerPaymentExportXLSX.tsx
index b14b5ef6..3fb21488 100644
--- a/src/components/pages/report/finance/export/CustomerPaymentExportXLSX.tsx
+++ b/src/components/pages/report/finance/export/CustomerPaymentExportXLSX.tsx
@@ -32,7 +32,9 @@ export const generateCustomerPaymentExcel = (
: '',
Aging: formatNumber(item.aging_day || 0),
Referensi: item.reference || '',
- 'Nomor Polisi': item.vehicle_numbers || '',
+ 'Nomor Polisi': Array.isArray(item.vehicle_numbers)
+ ? item.vehicle_numbers.join(', ')
+ : '',
'Ekor/Qty': formatNumber(item.qty || 0),
'Berat (Kg)': formatNumber(item.weight || 0),
AVG: formatNumber(item.average_weight || 0),
@@ -42,7 +44,9 @@ export const generateCustomerPaymentExcel = (
Pembayaran: formatCurrency(item.payment_amount || 0),
'Saldo Piutang': formatCurrency(item.accounts_receivable || 0),
Keterangan: item.status || '',
- Pengambilan: item.pickup_info || '',
+ Pengambilan: Array.isArray(item.pickup_info)
+ ? item.pickup_info.join(', ')
+ : '',
'Sales/Marketing': item.sales_person || '',
})
);
@@ -58,9 +62,7 @@ export const generateCustomerPaymentExcel = (
'Ekor/Qty': formatNumber(customerReport.summary.total_qty || 0),
'Berat (Kg)': formatNumber(customerReport.summary.total_weight || 0),
AVG: '',
- 'Harga Awal': formatCurrency(
- customerReport.summary.total_initial_amount || 0
- ),
+ 'Harga Awal': '',
'Harga Akhir': formatCurrency(
customerReport.summary.total_final_amount || 0
),
diff --git a/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx b/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx
index 928c9c41..18a8674a 100644
--- a/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx
+++ b/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx
@@ -412,9 +412,7 @@ const CustomerPaymentTab = () => {
return {formatCurrency(value)}
;
},
footer: () => (
-
- {formatCurrency(summary.total_initial_amount) || '-'}
-
+ -
),
},
{
@@ -510,7 +508,7 @@ const CustomerPaymentTab = () => {
status: getPaymentStatusIndicatorColor(value),
}}
>
- {getPaymentStatusText(value)}
+ {getPaymentStatusText(value)}
);
},
@@ -729,8 +727,6 @@ const CustomerPaymentTab = () => {
const summary = customerReport.summary || {
total_qty: 0,
total_weight: 0,
- total_initial_amount: 0,
- total_credit_note: 0,
total_final_amount: 0,
total_grand_amount: 0,
total_payment: 0,
diff --git a/src/types/api/report/customer-payment.d.ts b/src/types/api/report/customer-payment.d.ts
index f25f510a..9169c99b 100644
--- a/src/types/api/report/customer-payment.d.ts
+++ b/src/types/api/report/customer-payment.d.ts
@@ -7,7 +7,7 @@ export type CustomerPaymentRow = {
trans_date: string;
delivery_date: string | null;
reference: string;
- vehicle_numbers: string;
+ vehicle_numbers: string[];
qty: number;
weight: number;
average_weight: number;
@@ -16,16 +16,15 @@ export type CustomerPaymentRow = {
total_price: number;
payment_amount: number;
accounts_receivable: number;
- aging_day: number;
+ aging_day: number | null;
status: string;
- pickup_info: string;
+ pickup_info: string[];
sales_person: string;
};
export type CustomerPaymentSummary = {
total_qty: number;
total_weight: number;
- total_initial_amount: number;
total_final_amount: number;
total_grand_amount: number;
total_payment: number;