mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +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 }
|
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) => {
|
refresh: (frm) => {
|
||||||
|
|||||||
@@ -86,6 +86,7 @@
|
|||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Consumed Qty",
|
"label": "Consumed Qty",
|
||||||
|
"read_only": 1,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -193,7 +194,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-09-02 22:28:53.392381",
|
"modified": "2022-11-07 17:17:21.670761",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Subcontracting",
|
"module": "Subcontracting",
|
||||||
"name": "Subcontracting Receipt Supplied Item",
|
"name": "Subcontracting Receipt Supplied Item",
|
||||||
|
|||||||
Reference in New Issue
Block a user