mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
fix: don't reset net_purchase_amount for Composite Asset if already set
This commit is contained in:
@@ -551,7 +551,9 @@ frappe.ui.form.on("Asset", {
|
||||
asset_type: function (frm) {
|
||||
if (frm.doc.docstatus == 0) {
|
||||
if (frm.doc.asset_type == "Composite Asset") {
|
||||
frm.set_value("net_purchase_amount", 0);
|
||||
if (!frm.doc.net_purchase_amount) {
|
||||
frm.set_value("net_purchase_amount", 0);
|
||||
}
|
||||
} else {
|
||||
frm.set_df_property("net_purchase_amount", "read_only", 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user