mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
feat(Asset Repair): Add 'Accounting Dimensions' section
This commit is contained in:
@@ -27,7 +27,7 @@ frappe.ui.form.on('Asset Repair', {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'stock_items_section'], !(frm.doc.__islocal));
|
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'stock_items_section', 'accounting_dimensions_section'], !(frm.doc.__islocal));
|
||||||
},
|
},
|
||||||
|
|
||||||
repair_status: (frm) => {
|
repair_status: (frm) => {
|
||||||
|
|||||||
@@ -18,6 +18,10 @@
|
|||||||
"column_break_6",
|
"column_break_6",
|
||||||
"completion_date",
|
"completion_date",
|
||||||
"repair_status",
|
"repair_status",
|
||||||
|
"accounting_dimensions_section",
|
||||||
|
"cost_center",
|
||||||
|
"column_break_14",
|
||||||
|
"project",
|
||||||
"accounting_details",
|
"accounting_details",
|
||||||
"repair_cost",
|
"repair_cost",
|
||||||
"capitalize_repair_cost",
|
"capitalize_repair_cost",
|
||||||
@@ -188,12 +192,33 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "stock_items_section",
|
"fieldname": "stock_items_section",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "accounting_dimensions_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Accounting Dimensions"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "cost_center",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Cost Center",
|
||||||
|
"options": "Cost Center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "project",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Project",
|
||||||
|
"options": "Project"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_14",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-12 04:45:38.714776",
|
"modified": "2021-05-12 21:03:59.032864",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Repair",
|
"name": "Asset Repair",
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ class AssetRepair(Document):
|
|||||||
for item in self.stock_items:
|
for item in self.stock_items:
|
||||||
asset_value += item.total_value
|
asset_value += item.total_value
|
||||||
|
|
||||||
print("*" * 20)
|
|
||||||
print(asset_value)
|
|
||||||
frappe.db.set_value('Asset', self.asset, 'asset_value', asset_value)
|
frappe.db.set_value('Asset', self.asset, 'asset_value', asset_value)
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user