mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: message on successful creation of opening invoices (#25998)
This commit is contained in:
@@ -49,7 +49,15 @@ frappe.ui.form.on('Opening Invoice Creation Tool', {
|
|||||||
doc: frm.doc,
|
doc: frm.doc,
|
||||||
btn: $(btn_primary),
|
btn: $(btn_primary),
|
||||||
method: "make_invoices",
|
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]));
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,8 @@ def start_import(invoices):
|
|||||||
return names
|
return names
|
||||||
|
|
||||||
def publish(index, total, doctype):
|
def publish(index, total, doctype):
|
||||||
if total < 5: return
|
if total < 50:
|
||||||
|
return
|
||||||
frappe.publish_realtime(
|
frappe.publish_realtime(
|
||||||
"opening_invoice_creation_progress",
|
"opening_invoice_creation_progress",
|
||||||
dict(
|
dict(
|
||||||
@@ -241,4 +242,3 @@ def get_temporary_opening_account(company=None):
|
|||||||
|
|
||||||
return accounts[0].name
|
return accounts[0].name
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user