From 11b9b1adc51d04ce457b9ef4fdd7ae6d84c5333c Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sat, 20 Sep 2025 13:16:28 +0530 Subject: [PATCH] fix(purchase order): get party type based on supplier field --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 98837a86626..c6d2c9a8248 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1069,7 +1069,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (me.frm.doc.doctype == "Quotation" && me.frm.doc.quotation_to == "Customer") { (party_type = "Customer"), (party_name = me.frm.doc.party_name); } else { - party_type = frappe.meta.has_field(me.frm.doc.doctype, "customer") ? "Customer" : "Supplier"; + party_type = frappe.meta.has_field(me.frm.doc.doctype, "supplier") ? "Supplier" : "Customer"; party_name = me.frm.doc[party_type.toLowerCase()]; } if (party_name) {