feat(Asset Repair): Add stock_consumption checkbox

This commit is contained in:
GangaManoj 2021-05-12 21:22:36 +05:30
parent 234b473d93
commit 7ad74cf800
2 changed files with 16 additions and 7 deletions

View File

@ -27,7 +27,8 @@ frappe.ui.form.on('Asset Repair', {
// },
refresh: function(frm) {
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'stock_items_section', 'accounting_dimensions_section'], !(frm.doc.__islocal));
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'accounting_dimensions_section'], !(frm.doc.__islocal));
frm.toggle_display(['stock_consumption_details_section'], frm.doc.stock_consumption)
},
repair_status: (frm) => {

View File

@ -23,9 +23,10 @@
"accounting_details",
"repair_cost",
"capitalize_repair_cost",
"stock_consumption",
"column_break_8",
"payable_account",
"stock_items_section",
"stock_consumption_details_section",
"stock_items",
"section_break_9",
"description",
@ -173,10 +174,6 @@
"fieldname": "section_break_23",
"fieldtype": "Section Break"
},
{
"fieldname": "stock_items_section",
"fieldtype": "Section Break"
},
{
"fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break",
@ -197,12 +194,23 @@
{
"fieldname": "column_break_14",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "stock_consumption",
"fieldtype": "Check",
"label": "Stock Consumed During Repair"
},
{
"fieldname": "stock_consumption_details_section",
"fieldtype": "Section Break",
"label": "Stock Consumption Details"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2021-05-12 21:09:27.994356",
"modified": "2021-05-12 21:20:18.276755",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Repair",