fix: customer selection not mandatory in purchase invoice to fetch item details (#33572)
This commit is contained in:
parent
0ed938a490
commit
0f0bc9a462
@ -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) +
|
||||
|
Loading…
Reference in New Issue
Block a user