mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 11:44:11 +00:00
fix: show create purchase receipt button only when update stock is not checked
(cherry picked from commit ed550bb633)
This commit is contained in:
@@ -644,7 +644,7 @@ frappe.ui.form.on("Purchase Invoice", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
add_custom_buttons: function (frm) {
|
add_custom_buttons: function (frm) {
|
||||||
if (frm.doc.docstatus == 1 && frm.doc.per_received < 100) {
|
if (frm.doc.docstatus == 1 && frm.doc.per_received < 100 && frm.doc.update_stock == 0) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Purchase Receipt"),
|
__("Purchase Receipt"),
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user