Some work on customers view #3

This commit is contained in:
2025-11-04 13:51:31 +01:00
parent 3c2d35f458
commit 82e04acc2c
13 changed files with 154 additions and 51 deletions
@@ -84,8 +84,10 @@ watch(invoice,
(newValue, oldValue) => {
if (isLoading.value) {
if (!invoice.value) return;
// Initial load of invoice data
if (invoice.value && !invoice.value.billingData) {
if (!invoice.value.billingData) {
// Set default billing data from customer
invoice.value.billingData = {
companyName: invoice.value.customer?.companyName || "",
@@ -104,7 +106,7 @@ watch(invoice,
}
}
if (invoice.value && invoice.value.customer?.id !== 0) {
if (invoice.value.customer?.id !== 0) {
importCustomer.value = invoice.value.customer as Customer
// console.log("billingData contact", invoice.value?.billingData?.contactFirstName, invoice.value?.billingData?.contactLastName)
@@ -120,7 +122,6 @@ watch(invoice,
}
value.value = fromDate(new Date(invoice.value.invoiceDate), getLocalTimeZone())
}
else {
isDirty.value = true