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

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

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

Synced Dec 3, 23:15 UTC

feat(purchase): refresh linked draft voucher after purchase edit

davoodmehraban89 committed Nov 18, 2026 at 09:09 UTC 1d0c0f00cb8d38c8a2e9bed3ee3c0996361ce61b
1 file changed +1
js/purchases.js
+1
@@ -326,6 +326,7 @@
326 if(typeof jeGuardSourceMutation==='function'){try{jeGuardSourceMutation(old,'فاکتور خرید');}catch(e){alert(e.message);return;}}
327 Object.assign(old,payload);
328 alert('فاکتور خرید اصلاح شد.');
329 + if(old?.journalVoucherId&&typeof jeRpcRefreshSourceDraft==='function')void jeRpcRefreshSourceDraft('purchase',editId).then(()=>refreshAllSurfaces()).catch(e=>alert('خرید ذخیره شد اما سند حسابداری موقت همگام نشد؛ قبل از قطعی‌سازی بررسی کنید: '+e.message));
330 }else{
331 const record={id:'PUR_'+Date.now(),ownerUserId:currentUser.id,...payload,
332 accountingVersion:1,documentVersion:1,accountingStatus:'draft',documentStatus:'draft'};