Skip to content

Commit

Permalink
Merge pull request #31531 from nihantra/pur_inv_docstatus
Browse files Browse the repository at this point in the history
fix: Set the condition to create a purchase receipt
  • Loading branch information
deepeshgarg007 authored Jul 5, 2022
2 parents 37f7801 + 3e670ed commit b785d7b
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 b785d7b

Please sign in to comment.