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

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

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

Synced Dec 3, 15:45 UTC

Preserve settlement and project in invoice drafts

davoodmehraban89 committed Sep 28, 2026 at 13:42 UTC 084a46ebf31ebed289874d84fdf907eaad64a78b
1 file changed +4
js/idle-and-reports.js
+4
@@ -56,6 +56,8 @@
56 vatRate: document.getElementById('invoice-vat-rate-input')?.value||'',
57 number: document.getElementById('invoice-number')?.value||'',
58 contactId: document.getElementById('invoice-contact-id')?.value||'',
59 + paymentMethod: document.getElementById('invoice-payment-method')?.value||'cash',
60 + projectId: document.getElementById('invoice-project-id')?.value||'',
61 date: document.getElementById('invoice-date-input')?.value||'',
62 discountType: document.getElementById('invoice-discount-type')?.value||'',
63 discountFixed: document.getElementById('invoice-discount-fixed')?.value||'',
@@ -140,6 +142,8 @@
142 document.getElementById('invoice-vat-rate-input').value=snap.vatRate||10;
143 document.getElementById('invoice-number').value=snap.number||'';
144 document.getElementById('invoice-contact-id').value=snap.contactId||'';
145 + if(document.getElementById('invoice-payment-method'))document.getElementById('invoice-payment-method').value=snap.paymentMethod||'cash';
146 + if(typeof handleInvoiceContactChange==='function'){handleInvoiceContactChange();if(document.getElementById('invoice-project-id'))document.getElementById('invoice-project-id').value=snap.projectId||'';}
147 document.getElementById('invoice-date-input').value=snap.date||'';
148 document.getElementById('invoice-discount-type').value=snap.discountType||'fixed';
149 document.getElementById('invoice-discount-fixed').value=snap.discountFixed||0;