mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
fix: set frm.has_active_capitalization before using it
(cherry picked from commit e2ac7646e6)
# Conflicts:
# erpnext/assets/doctype/asset/asset.js
This commit is contained in:
@@ -206,6 +206,8 @@ frappe.ui.form.on("Asset", {
|
|||||||
asset: frm.doc.name,
|
asset: frm.doc.name,
|
||||||
},
|
},
|
||||||
callback: function (r) {
|
callback: function (r) {
|
||||||
|
frm.has_active_capitalization = r.message;
|
||||||
|
|
||||||
if (!r.message) {
|
if (!r.message) {
|
||||||
$(".form-message").text(__("Capitalize this asset before submitting."));
|
$(".form-message").text(__("Capitalize this asset before submitting."));
|
||||||
|
|
||||||
@@ -478,8 +480,12 @@ frappe.ui.form.on("Asset", {
|
|||||||
|
|
||||||
is_composite_asset: function (frm) {
|
is_composite_asset: function (frm) {
|
||||||
if (frm.doc.is_composite_asset) {
|
if (frm.doc.is_composite_asset) {
|
||||||
|
<<<<<<< HEAD
|
||||||
frm.set_value("gross_purchase_amount", 0);
|
frm.set_value("gross_purchase_amount", 0);
|
||||||
frm.set_df_property("gross_purchase_amount", "read_only", 1);
|
frm.set_df_property("gross_purchase_amount", "read_only", 1);
|
||||||
|
=======
|
||||||
|
frm.set_value("net_purchase_amount", 0);
|
||||||
|
>>>>>>> e2ac7646e6 (fix: set frm.has_active_capitalization before using it)
|
||||||
} else {
|
} else {
|
||||||
frm.set_df_property("gross_purchase_amount", "read_only", 0);
|
frm.set_df_property("gross_purchase_amount", "read_only", 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user