This commit is contained in:
2026-08-19 22:19:46 +02:00
parent b644253e0b
commit 1bb38ba02d
3 changed files with 94 additions and 91 deletions

View File

@@ -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}`);