@@ -31,7 +31,15 @@ export default function InvoicePaymentsSection() {
|
||||
|
||||
<PaymentReceivedForm
|
||||
invoiceId={invoice?.id as string}
|
||||
invoiceCustomer={invoice?.customer as any}
|
||||
invoiceCustomer={
|
||||
(invoice?.customer as any) ??
|
||||
((invoice as any)?.customer_id
|
||||
? {
|
||||
id: (invoice as any).customer_id,
|
||||
first_name: (invoice as any).customer_name,
|
||||
}
|
||||
: null)
|
||||
}
|
||||
invoiceAmount={invoice?.balance_due as any}
|
||||
resourceId={resourceId}
|
||||
onSuccess={()=>{router.refresh(); invalidateQuery()}}
|
||||
|
||||
Reference in New Issue
Block a user