korrektur
This commit is contained in:
parent
cc41ed6ec9
commit
053f01c5ec
|
|
@ -247,7 +247,8 @@ async function openQuoteModal(quoteId = null) {
|
|||
const data = await response.json();
|
||||
|
||||
// Set customer in Alpine component
|
||||
const customer = customers.find(c => c.id === data.quote.customer_id);
|
||||
const allCust = window.getCustomers ? window.getCustomers() : customers;
|
||||
const customer = allCust.find(c => c.id === data.quote.customer_id);
|
||||
if (customer) {
|
||||
// Find the Alpine component and update it
|
||||
const customerInput = document.querySelector('#quote-modal input[placeholder="Search customer..."]');
|
||||
|
|
@ -652,7 +653,8 @@ async function openInvoiceModal(invoiceId = null) {
|
|||
const data = await response.json();
|
||||
|
||||
// Set customer in Alpine component
|
||||
const customer = customers.find(c => c.id === data.invoice.customer_id);
|
||||
const allCust = window.getCustomers ? window.getCustomers() : customers;
|
||||
const customer = allCust.find(c => c.id === data.invoice.customer_id);
|
||||
if (customer) {
|
||||
const customerInput = document.querySelector('#invoice-modal input[placeholder="Search customer..."]');
|
||||
if (customerInput) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue