FIX: saving new invoices was broken because changing a customer would only store billingData, but not a customerId

This commit is contained in:
2025-10-22 16:13:01 +02:00
parent 82b7215dca
commit beade697a8
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -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,