fix: show stock entry button only if update stock is enabled
This commit is contained in:
parent
f5eddce407
commit
cf012ca9c3
@ -30,7 +30,7 @@ frappe.ui.form.on('Inpatient Medication Entry', {
|
||||
};
|
||||
});
|
||||
|
||||
if (frm.doc.__islocal || frm.doc.docstatus !== 0)
|
||||
if (frm.doc.__islocal || frm.doc.docstatus !== 0 || !frm.doc.update_stock)
|
||||
return;
|
||||
|
||||
frm.add_custom_button(__('Make Stock Entry'), function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user