Skip to content

Commit

Permalink
fix: don't show button when frm is new
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Sep 27, 2024
1 parent a6911d0 commit 1582f81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
);
}

if (doc.docstatus === 0) {
if (doc.docstatus === 0 && !this.frm.is_new()) {
const cur_doc = this.frm.doc;
const invoice_items = cur_doc.items;

Expand Down

0 comments on commit 1582f81

Please sign in to comment.