سامانه صدور فاکتور و حسابداری

fix: prevent creating corrective draft after standalone cancellation (#216)

davoodmehraban89 committed Nov 18, 2026 at 21:24 UTC be7dca312697e4b92db9bd83b22e7b2feec759c2
1 file changed +1
js/invoices.js
+1
@@ -467,6 +467,7 @@ async function reopenPostedInvoiceAsDraft(invoiceId,reason){
467 await invoicePilotAwaitSync(['journalVouchers|'+v.id,'journalVouchers|'+existing.correctionReversalId,'invoices|'+existing.id]);
468 refreshAllSurfaces();return existing.id;
469 }
470 + throw new Error('سند قبلاً ابطال شده و پیش‌نویس اصلاحی ندارد؛ ایجاد اصلاحیه جدید پس از ابطال مجاز نیست.');
471 }
472 // Resolve number/clone before reversing, so validation failures do not touch posting.
473 const number=invoicePilotCorrectionNumber(inv);