mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix(ux): make basic_rate field read-only based on purpose
This commit is contained in:
@@ -311,6 +311,7 @@ frappe.ui.form.on('Stock Entry', {
|
||||
})
|
||||
}, __("Get Items From"));
|
||||
}
|
||||
|
||||
if (frm.doc.docstatus === 0 && frm.doc.purpose == "Material Issue") {
|
||||
frm.add_custom_button(__('Expired Batches'), function() {
|
||||
frappe.call({
|
||||
@@ -397,6 +398,10 @@ frappe.ui.form.on('Stock Entry', {
|
||||
frm.remove_custom_button('Bill of Materials', "Get Items From");
|
||||
frm.events.show_bom_custom_button(frm);
|
||||
frm.trigger('add_to_transit');
|
||||
|
||||
frm.fields_dict.items.grid.update_docfield_property(
|
||||
'basic_rate', 'read_only', frm.doc.purpose == "Material Receipt" ? 0 : 1
|
||||
);
|
||||
},
|
||||
|
||||
purpose: function(frm) {
|
||||
|
||||
Reference in New Issue
Block a user