سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 10:30 UTC
fix(print): disallow stale off-company invoice printing
davoodmehraban89 committed
Oct 14, 2026 at 12:31 UTC
8e0d33af2ac270583616b05508e9fb648cdf69f4
1 file changed
+3
js/print.js
+3
@@ -535,6 +535,9 @@ function buildNonFormalPage(items,seller,contact,inv,opt){
535
}
536
function renderAndPrintDirect(invId){
537
const record=getMyInvoices().find(i=>i.id===invId);
538
+ if(!record||!afCompanyId()||record.companyId!==afCompanyId()){
539
+ alert('برای چاپ، ابتدا شرکت مربوط به فاکتور را در تنظیمات فعال کنید.');return;
540
+ }
541
const inv=typeof invoicePrintView==='function'?invoicePrintView(record):record;
542
if(!inv)return;
543
const myCompanies=getMyCompanies();