korrektur
This commit is contained in:
@@ -247,7 +247,8 @@ async function openQuoteModal(quoteId = null) {
|
|||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
// Set customer in Alpine component
|
// 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) {
|
if (customer) {
|
||||||
// Find the Alpine component and update it
|
// Find the Alpine component and update it
|
||||||
const customerInput = document.querySelector('#quote-modal input[placeholder="Search customer..."]');
|
const customerInput = document.querySelector('#quote-modal input[placeholder="Search customer..."]');
|
||||||
@@ -652,7 +653,8 @@ async function openInvoiceModal(invoiceId = null) {
|
|||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
// Set customer in Alpine component
|
// 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) {
|
if (customer) {
|
||||||
const customerInput = document.querySelector('#invoice-modal input[placeholder="Search customer..."]');
|
const customerInput = document.querySelector('#invoice-modal input[placeholder="Search customer..."]');
|
||||||
if (customerInput) {
|
if (customerInput) {
|
||||||
|
|||||||
Reference in New Issue
Block a user