diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 6e810e5987ed..a37911fbec4c 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -175,7 +175,9 @@ frappe.ui.form.on("Item", { frappe.call({ method: "erpnext.stock.doctype.item.item.get_asset_naming_series", callback: function(r) { - frm.set_value("is_stock_item", frm.doc.is_fixed_asset ? 0 : 1); + if (frm.doc.is_fixed_asset) { + frm.set_value("is_stock_item", 0); + } frm.events.set_asset_naming_series(frm, r.message); } }); diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index c13d3ebe0f01..4024ce7551b0 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -19,16 +19,16 @@ "stock_uom", "column_break0", "disabled", - "allow_alternative_item", + "is_fixed_asset", + "auto_create_assets", + "is_grouped_asset", + "asset_category", "is_stock_item", + "allow_alternative_item", "has_variants", "opening_stock", "valuation_rate", "standard_rate", - "is_fixed_asset", - "auto_create_assets", - "is_grouped_asset", - "asset_category", "asset_naming_series", "over_delivery_receipt_allowance", "over_billing_allowance", @@ -202,6 +202,7 @@ "label": "Allow Alternative Item" }, { + "allow_in_quick_entry": 1, "bold": 1, "default": "1", "depends_on": "eval:!doc.is_fixed_asset", @@ -239,13 +240,16 @@ "label": "Standard Selling Rate" }, { + "allow_in_quick_entry": 1, "default": "0", "fieldname": "is_fixed_asset", "fieldtype": "Check", "label": "Is Fixed Asset", + "read_only_depends_on": "is_stock_item", "set_only_once": 1 }, { + "allow_in_quick_entry": 1, "depends_on": "is_fixed_asset", "fieldname": "asset_category", "fieldtype": "Link", @@ -888,7 +892,7 @@ "index_web_pages_for_search": 1, "links": [], "make_attachments_public": 1, - "modified": "2023-09-11 13:46:32.688051", + "modified": "2023-10-24 08:12:41.307459", "modified_by": "Administrator", "module": "Stock", "name": "Item", @@ -961,4 +965,4 @@ "states": [], "title_field": "item_name", "track_changes": 1 -} +} \ No newline at end of file