commit | 3e670eda68653a077e8c0ae56791d58f4b74d4fe | [log] [tgz] |
---|---|---|
author | Nihantra C. Patel <99652762+nihantra@users.noreply.github.com> | Tue Jul 05 21:19:50 2022 +0530 |
committer | GitHub <noreply@github.com> | Tue Jul 05 21:19:50 2022 +0530 |
tree | 3acaed9d7d271d3774208c5da79e12fc84159414 | |
parent | 37f7801cfb8e71756d03287e9a06767d36faff4e [diff] |
fix: Set the condition to create a purchase receipt
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 7e3597e..686db9d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -539,7 +539,7 @@ }, 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'));