mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 12:55:10 +00:00
fix: update label on company change
(cherry picked from commit 6219a9e6f0)
This commit is contained in:
@@ -36,6 +36,7 @@ frappe.ui.form.on("Asset", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
company: function (frm) {
|
company: function (frm) {
|
||||||
|
frm.trigger("set_dynamic_labels");
|
||||||
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
|
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -87,7 +88,7 @@ frappe.ui.form.on("Asset", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
refresh: async function (frm) {
|
refresh: async function (frm) {
|
||||||
frm.set_currency_labels(["net_purchase_amount"], erpnext.get_currency(frm.doc.company));
|
frm.trigger("set_dynamic_labels");
|
||||||
|
|
||||||
frappe.ui.form.trigger("Asset", "asset_type");
|
frappe.ui.form.trigger("Asset", "asset_type");
|
||||||
frm.toggle_display("next_depreciation_date", frm.doc.docstatus < 1);
|
frm.toggle_display("next_depreciation_date", frm.doc.docstatus < 1);
|
||||||
@@ -229,6 +230,10 @@ frappe.ui.form.on("Asset", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
set_dynamic_labels: function (frm) {
|
||||||
|
frm.set_currency_labels(["net_purchase_amount"], erpnext.get_currency(frm.doc.company));
|
||||||
|
},
|
||||||
|
|
||||||
should_show_accounting_ledger: async function (frm) {
|
should_show_accounting_ledger: async function (frm) {
|
||||||
if (["Capitalized"].includes(frm.doc.status)) {
|
if (["Capitalized"].includes(frm.doc.status)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user