From cb80bcd0ee4cedd34e72053d7d442577bd4cb5c2 Mon Sep 17 00:00:00 2001 From: Solufyin <34390782+Solufyin@users.noreply.github.com> Date: Wed, 13 Jul 2022 11:55:47 +0530 Subject: [PATCH] fix: Opening Invoice Creation Tool msgprint --- .../opening_invoice_creation_tool.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js index 9f22ab0d76c..7eb5c4234d1 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js @@ -49,7 +49,15 @@ frappe.ui.form.on('Opening Invoice Creation Tool', { doc: frm.doc, btn: $(btn_primary), method: "make_invoices", - freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]) + freeze: 1, + freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]), + callback: function(r) { + if (r.message.length == 1) { + frappe.msgprint(__("{0} Invoice created successfully.", [frm.doc.invoice_type])); + } else if (r.message.length < 50) { + frappe.msgprint(__("{0} Invoices created successfully.", [frm.doc.invoice_type])); + } + } }); });