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

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

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

Synced Dec 3, 22:00 UTC

fix: recognize linked draft invoices as temporary

davoodmehraban89 committed Nov 18, 2026 at 09:03 UTC e4ea62348694999a37d4ff81b75384659843d88c
1 file changed +2 -2
js/invoices.js
+2 -2
@@ -368,8 +368,8 @@ function invoiceDocumentStatus(inv){
368 if(!inv)return 'unknown';
369 const linked=inv.journalVoucherId&&typeof jeSourceVoucher==='function'?jeSourceVoucher(inv):null;
370 if(linked?.status==='reversed'||inv.accountingStatus==='reversed'||inv.documentStatus==='reversed')return 'reversed';
371 - if(linked?.status==='posted'||inv.journalVoucherId||inv.accountingStatus==='posted'||inv.documentStatus==='posted')return 'posted';
372 - if(inv.documentStatus==='draft'||inv.accountingStatus==='draft')return 'draft';
371 + if(linked?.status==='posted'||inv.accountingStatus==='posted'||inv.documentStatus==='posted')return 'posted';
372 + if(linked?.status==='draft'||inv.documentStatus==='draft'||inv.accountingStatus==='draft')return 'draft';
373 if(invoiceCreatesAccountingEntry(inv.kind))return 'legacy_review';
374 return 'operational';
375 }