mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 06:22:12 +00:00
fix(Opening Invoice Creation Tool): translatability of messages
(cherry picked from commit f3c5803198)
This commit is contained in:
@@ -28,7 +28,12 @@ frappe.ui.form.on("Opening Invoice Creation Tool", {
|
|||||||
frm.refresh_fields();
|
frm.refresh_fields();
|
||||||
frm.page.clear_indicator();
|
frm.page.clear_indicator();
|
||||||
frm.dashboard.hide_progress();
|
frm.dashboard.hide_progress();
|
||||||
frappe.msgprint(__("Opening {0} Invoices created", [frm.doc.invoice_type]));
|
|
||||||
|
if (frm.doc.invoice_type == "Sales") {
|
||||||
|
frappe.msgprint(__("Opening Sales Invoices have been created."));
|
||||||
|
} else {
|
||||||
|
frappe.msgprint(__("Opening Purchase Invoices have been created."));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
1500,
|
1500,
|
||||||
data.title
|
data.title
|
||||||
@@ -48,12 +53,19 @@ frappe.ui.form.on("Opening Invoice Creation Tool", {
|
|||||||
!frm.doc.import_in_progress && frm.trigger("make_dashboard");
|
!frm.doc.import_in_progress && frm.trigger("make_dashboard");
|
||||||
frm.page.set_primary_action(__("Create Invoices"), () => {
|
frm.page.set_primary_action(__("Create Invoices"), () => {
|
||||||
let btn_primary = frm.page.btn_primary.get(0);
|
let btn_primary = frm.page.btn_primary.get(0);
|
||||||
|
let freeze_message;
|
||||||
|
if (frm.doc.invoice_type == "Sales") {
|
||||||
|
freeze_message = __("Creating Sales Invoices ...");
|
||||||
|
} else {
|
||||||
|
freeze_message = __("Creating Purchase Invoices ...");
|
||||||
|
}
|
||||||
|
|
||||||
return frm.call({
|
return frm.call({
|
||||||
doc: frm.doc,
|
doc: frm.doc,
|
||||||
btn: $(btn_primary),
|
btn: $(btn_primary),
|
||||||
method: "make_invoices",
|
method: "make_invoices",
|
||||||
freeze: 1,
|
freeze: 1,
|
||||||
freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]),
|
freeze_message: freeze_message,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user