سامانه صدور فاکتور و حسابداری
fix: initialize one editable invoice product row on first load
Davood Mehraban committed
Oct 10, 2026 at 22:53 UTC
7b5796a15423d5dc74666f5649ef02f7d72c0c17
1 file changed
+3
js/invoices.js
+3
@@ -484,3 +484,6 @@ function renderInvoices(){
484
</td>
485
</tr>`).join('');
486
}
487
+
488
+function finoraEnsureInitialInvoiceRow(){const body=document.getElementById('invoice-items-table-body');if(body&&!body.querySelector('tr')&&!document.getElementById('edit-invoice-id')?.value)addInvoiceItemRow()}
489
+if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',finoraEnsureInitialInvoiceRow,{once:true});else finoraEnsureInitialInvoiceRow();