@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / d9aee0a
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 00:30 UTC

fix(lifecycle): delete linked drafts through server transaction

davoodmehraban89 committed Nov 18, 2026 at 09:03 UTC d9aee0a2bc6602212fe8d9e0ebfe4e8c8fd4d361
1 file changed +2 -2
js/document-management.js
+2 -2
@@ -91,7 +91,7 @@ document.addEventListener('click',async event=>{
91 }
92 if(action==='delete'){
93 if(!confirm('پیش‌نویس انتخابی حذف شود؟ سند قطعی/تاریخچه حذف نخواهد شد.'))return;
94 - try{deleteInvoicePilotDraft(inv.id);renderDocumentManagement();}
94 + try{await deleteInvoicePilotDraft(inv.id);renderDocumentManagement();}
95 catch(e){alert('حذف پیش‌نویس مجاز نیست: '+e.message);}
96 return;
97 }
@@ -102,4 +102,4 @@ document.addEventListener('click',async event=>{
102 if(typeof openDashboardVoucher==='function'&&inv.journalVoucherId)return openDashboardVoucher(inv.journalVoucherId);
103 alert('مرجع حسابداری قابل نمایش نیست.');
104 }
105 -});
105 +});
\ No newline at end of file