refactor(FE): Adapt customer payment report types and exports

This commit is contained in:
rstubryan
2026-01-12 21:39:22 +07:00
parent 96a5eb1be5
commit e1c0701629
5 changed files with 24 additions and 24 deletions
@@ -279,10 +279,14 @@ const CustomerPaymentTab = () => {
{
id: 'aging',
header: 'Aging',
accessorKey: 'aging',
accessorKey: 'aging_day',
cell: (props) => {
const value = props.row.original.aging;
return <div className='text-center'>{formatNumber(value)} hari</div>;
const value = props.row.original.aging_day;
return (
<div className='text-center'>
{value ? formatNumber(value) : '-'} hari
</div>
);
},
},
{
@@ -662,7 +666,7 @@ const CustomerPaymentTab = () => {
<Card
key={customerReport.customer.id}
title={customerReport.customer.name}
subtitle={`NPWP: ${customerReport.customer_npwp || '-'} | ${customerReport.customer_address || ''}\nSaldo Piutang: ${formatCurrency(totalAccountsReceivable)}`}
subtitle={`${customerReport.customer.address || ''}\nSaldo Piutang: ${formatCurrency(totalAccountsReceivable)}`}
className={{ wrapper: 'w-full' }}
variant='bordered'
collapsible={true}