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()
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()
# Get Item Details
@@ -635,7 +635,7 @@ def get_target_item_details(item_code=None, company=None):
@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()
# Get Asset Details

View File

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