mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-21 15:48:29 +00:00
fixes in validattion of debit to account with customer in sales invoice
This commit is contained in:
@@ -314,7 +314,7 @@ class DocType(TransactionBase):
|
||||
# ------------------------------------------------
|
||||
def validate_debit_to_acc(self):
|
||||
if self.doc.customer and self.doc.debit_to and not cint(self.doc.is_pos):
|
||||
acc_head = sql("select master_name from `tabAccount` where name = %s and docstatus != 2", self.doc.debit_to)
|
||||
acc_head = webnotes.conn.sql("select master_name from `tabAccount` where name = %s and docstatus != 2", self.doc.debit_to)
|
||||
|
||||
if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.customer)) or \
|
||||
(not acc_head and (self.doc.debit_to != cstr(self.doc.customer) + " - " + self.get_company_abbr())):
|
||||
|
||||
Reference in New Issue
Block a user