سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 17:00 UTC
fix: prevent creating corrective draft after standalone cancellation (#216)
davoodmehraban89 committed
Nov 18, 2026 at 21:24 UTC
5aba8cb76bf4aa82fb1584eacabcf68fecd2b70b
1 file changed
+1
js/purchases.js
+1
@@ -159,6 +159,7 @@
159
await invoicePilotAwaitSync(['journalVouchers|'+v.id,'journalVouchers|'+existing.correctionReversalId,'purchases|'+existing.id]);
160
refreshAllSurfaces();return existing.id;
161
}
162
+ throw new Error('خرید قبلاً ابطال شده و پیشنویس اصلاحی ندارد؛ ایجاد اصلاحیه جدید پس از ابطال مجاز نیست.');
163
}
164
const number=purchasePilotNumber(p),now=new Date().toISOString(),newId=afId('PUR');
165
const draft={...p,id:newId,number,date:getJalaliNumeric(),documentStatus:'draft',accountingStatus:'draft',createdAt:now,updatedAt:now,