mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 13:49:13 +00:00
Merge pull request #32884 from frappe/mergify/bp/version-14-hotfix/pr-32877
fix: make `consumed_qty` read-only in SCR Supplied Items (backport #32877)
This commit is contained in:
@@ -57,6 +57,18 @@ frappe.ui.form.on('Subcontracting Receipt', {
|
||||
filters: { 'company': frm.doc.company }
|
||||
};
|
||||
});
|
||||
|
||||
frappe.db.get_single_value('Buying Settings', 'backflush_raw_materials_of_subcontract_based_on').then(val => {
|
||||
if (val == 'Material Transferred for Subcontract') {
|
||||
frm.fields_dict['supplied_items'].grid.grid_rows.forEach((grid_row) => {
|
||||
grid_row.docfields.forEach((df) => {
|
||||
if (df.fieldname == 'consumed_qty') {
|
||||
df.read_only = 0;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
refresh: (frm) => {
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Consumed Qty",
|
||||
"read_only": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@@ -193,7 +194,7 @@
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-09-02 22:28:53.392381",
|
||||
"modified": "2022-11-07 17:17:21.670761",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Subcontracting",
|
||||
"name": "Subcontracting Receipt Supplied Item",
|
||||
|
||||
Reference in New Issue
Block a user