fix: customer selection not mandatory in purchase invoice to fetch item details (#34810)

This commit is contained in:
Deepesh Garg
2023-04-11 14:17:27 +05:30
committed by GitHub
parent fee4cd5f40
commit 994272b966

View File

@@ -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) +