Skip to content

Commit

Permalink
fix: customer selection not mandatory in purchase invoice to fetch it…
Browse files Browse the repository at this point in the history
…em details (#34810)
  • Loading branch information
deepeshgarg007 authored Apr 11, 2023
1 parent fee4cd5 commit 994272b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
}

$.each(["company", "customer"], function(i, fieldname) {
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname) && me.frm.doc.doctype != "Purchase Order") {
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname) && !["Purchase Order","Purchase Invoice"].includes(me.frm.doc.doctype)) {
if (!me.frm.doc[fieldname]) {
frappe.msgprint(__("Please specify") + ": " +
frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name) +
Expand Down

0 comments on commit 994272b

Please sign in to comment.