From 0c92493c819abc38a86a76fe4d539de408dbfd8d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 16 Nov 2011 10:12:32 +0530 Subject: [PATCH] Fixed check_for_acc_of_supplier validation --- erpnext/accounts/doctype/payable_voucher/payable_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py index 9f77935a5e..c4f0bc5746 100644 --- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py +++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py @@ -235,7 +235,7 @@ class DocType(TransactionBase): if self.doc.supplier and self.doc.credit_to: acc_head = sql("select master_name from `tabAccount` where name = %s", self.doc.credit_to) - if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.credit_to)) or (not acc_head and (self.doc.credit_to != cstr(self.doc.supplier) + " - " + self.get_company_abbr())): + if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.supplier)) or (not acc_head and (self.doc.credit_to != cstr(self.doc.supplier) + " - " + self.get_company_abbr())): msgprint("Credit To: %s do not match with Supplier: %s for Company: %s.\n If both correctly entered, please select Master Type and Master Name in account master." %(self.doc.credit_to,self.doc.supplier,self.doc.company), raise_exception=1) # Check for Stopped PO