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

This commit is contained in:
vr-greycube 2023-01-10 20:26:33 +05:30 committed by GitHub
parent 0ed938a490
commit 0f0bc9a462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1691,7 +1691,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
var valid = true;
$.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) +