fix
This commit is contained in:
@@ -465,6 +465,18 @@ export async function handleInvoiceSubmit(e) {
|
||||
if (result.qbo_doc_number) console.log(`✅ Invoice saved & exported to QBO: #${result.qbo_doc_number}`);
|
||||
else if (result.qbo_synced) console.log('✅ Invoice saved & synced to QBO');
|
||||
else console.log('✅ Invoice saved locally (QBO sync pending)');
|
||||
|
||||
// Ein fehlgeschlagener QBO-Sync wurde frueher nur in die Konsole
|
||||
// geschrieben. Folge: Die Rechnung stand lokal korrekt da, in QBO aber
|
||||
// unvollstaendig — der Kunde zahlte den vollen Betrag, und die Differenz
|
||||
// blieb als Guthaben haengen. Deshalb jetzt sichtbar melden.
|
||||
if (result.qbo_error) {
|
||||
alert('⚠️ Invoice saved locally, but QuickBooks was NOT updated:\n\n'
|
||||
+ result.qbo_error
|
||||
+ '\n\nThe QBO invoice may be missing or incomplete. Please check it in QBO.');
|
||||
} else if (result.qbo_skipped) {
|
||||
console.log(`ℹ️ QBO skipped: ${result.qbo_skipped}`);
|
||||
}
|
||||
if (window.invoiceView) window.invoiceView.loadInvoices();
|
||||
} else {
|
||||
alert(`Error: ${result.error}`);
|
||||
|
||||
Reference in New Issue
Block a user