refactor: asset repair UI changes

This commit is contained in:
khushi8112
2026-02-06 11:42:24 +05:30
parent eb7932ed73
commit 9f7bfc0e36
2 changed files with 26 additions and 12 deletions

View File

@@ -609,7 +609,7 @@ class AssetCapitalization(StockController):
@frappe.whitelist() @frappe.whitelist()
def get_target_item_details(item_code=None, company=None): def get_target_item_details(item_code: str | None = None, company: str | None = None) -> frappe._dict:
out = frappe._dict() out = frappe._dict()
# Get Item Details # Get Item Details
@@ -635,7 +635,7 @@ def get_target_item_details(item_code=None, company=None):
@frappe.whitelist() @frappe.whitelist()
def get_target_asset_details(asset=None, company=None): def get_target_asset_details(asset: str | None = None, company: str | None = None) -> frappe._dict:
out = frappe._dict() out = frappe._dict()
# Get Asset Details # Get Asset Details

View File

@@ -9,9 +9,9 @@
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [ "field_order": [
"naming_series", "naming_series",
"company",
"asset", "asset",
"asset_name", "asset_name",
"company",
"column_break_2", "column_break_2",
"repair_status", "repair_status",
"failure_date", "failure_date",
@@ -28,10 +28,6 @@
"column_break_ajbh", "column_break_ajbh",
"column_break_hkem", "column_break_hkem",
"repair_cost", "repair_cost",
"accounting_dimensions_section",
"cost_center",
"column_break_14",
"project",
"stock_consumption_details_section", "stock_consumption_details_section",
"stock_items", "stock_items",
"section_break_ltbb", "section_break_ltbb",
@@ -43,7 +39,13 @@
"capitalize_repair_cost", "capitalize_repair_cost",
"increase_in_asset_life", "increase_in_asset_life",
"column_break_xebe", "column_break_xebe",
"total_repair_cost" "total_repair_cost",
"accounting_dimensions_section",
"cost_center",
"column_break_14",
"project",
"accounting_dimension_tab",
"connection_tab"
], ],
"fields": [ "fields": [
{ {
@@ -149,8 +151,7 @@
{ {
"fieldname": "accounting_details", "fieldname": "accounting_details",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hide_border": 1, "hide_border": 1
"label": "Repair Purchase Invoices"
}, },
{ {
"fieldname": "stock_items", "fieldname": "stock_items",
@@ -206,6 +207,7 @@
{ {
"fieldname": "invoices", "fieldname": "invoices",
"fieldtype": "Table", "fieldtype": "Table",
"label": "Repair Purchase Invoices",
"mandatory_depends_on": "eval: doc.repair_status == 'Completed' && doc.repair_cost > 0;", "mandatory_depends_on": "eval: doc.repair_status == 'Completed' && doc.repair_cost > 0;",
"no_copy": 1, "no_copy": 1,
"options": "Asset Repair Purchase Invoice" "options": "Asset Repair Purchase Invoice"
@@ -244,6 +246,7 @@
"fieldtype": "Column Break" "fieldtype": "Column Break"
}, },
{ {
"depends_on": "eval: doc.consumed_items_cost",
"fieldname": "consumed_items_cost", "fieldname": "consumed_items_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Consumed Items Cost" "label": "Consumed Items Cost"
@@ -256,7 +259,18 @@
"depends_on": "capitalize_repair_cost", "depends_on": "capitalize_repair_cost",
"fieldname": "accounting_dimensions_section", "fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Accounting Dimensions" "label": "Accounting Dimension"
},
{
"fieldname": "accounting_dimension_tab",
"fieldtype": "Tab Break",
"label": "Accounting Dimension"
},
{
"fieldname": "connection_tab",
"fieldtype": "Tab Break",
"label": "Connection",
"show_dashboard": 1
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
@@ -267,7 +281,7 @@
"link_fieldname": "asset_repair" "link_fieldname": "asset_repair"
} }
], ],
"modified": "2026-01-06 15:48:13.862505", "modified": "2026-02-06 02:25:37.536357",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Assets", "module": "Assets",
"name": "Asset Repair", "name": "Asset Repair",