From 10c1db1b2831123f2c7c904c876b8de4bbb26f25 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Tue, 26 Mar 2019 16:30:31 +0530 Subject: [PATCH] fix: removed empty row on getting invoices --- .../accounts/doctype/invoice_discounting/invoice_discounting.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js index 328df4f813..88cb939678 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js @@ -129,6 +129,7 @@ frappe.ui.form.on('Invoice Discounting', { if(!r.exc) { d.hide(); $.each(r.message, function(i, v) { + frm.doc.invoices = frm.doc.invoices.filter(row => row.sales_invoice); let row = frm.add_child("invoices"); $.extend(row, v); });