Skip to content

Commit

Permalink
fix: Set the condition to create a purchase receipt
Browse files Browse the repository at this point in the history
  • Loading branch information
Solufyin authored Aug 22, 2022
1 parent d46ce05 commit b4c992d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ frappe.ui.form.on("Purchase Invoice", {
},

add_custom_buttons: function(frm) {
if (frm.doc.per_received < 100) {
if (frm.doc.docstatus == 1 && frm.doc.per_received < 100) {
frm.add_custom_button(__('Purchase Receipt'), () => {
frm.events.make_purchase_receipt(frm);
}, __('Create'));
Expand Down

0 comments on commit b4c992d

Please sign in to comment.