FIX: saving new invoices was broken because changing a customer would only store billingData, but not a customerId
This commit is contained in:
@@ -111,7 +111,7 @@ const saveInvoice = async (updatedInvoice: Invoice) => {
|
||||
totalAmount: updatedInvoice.totalAmount,
|
||||
title: updatedInvoice.title,
|
||||
text: updatedInvoice.text,
|
||||
customer: updatedInvoice.customer,
|
||||
customerId: updatedInvoice.customer ? updatedInvoice.customer.id : null,
|
||||
billingData: {
|
||||
companyName: updatedInvoice.billingData?.companyName,
|
||||
vatId: updatedInvoice.billingData?.vatId,
|
||||
|
||||
Reference in New Issue
Block a user