fix: show stock entry button only if update stock is enabled

This commit is contained in:
Rucha Mahabal 2020-11-27 12:39:33 +05:30
parent f5eddce407
commit cf012ca9c3

View File

@ -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() {