mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -108,7 +108,7 @@ class DocType:
|
||||
msgprint("Supplier Type is mandatory")
|
||||
raise Exception
|
||||
|
||||
if not sql("select name from tabAccount where name=%s", (self.doc.supplier_type + " - " + abbr)):
|
||||
if not sql("select name from tabAccount where name=%s and debit_or_credit = 'Credit' and ifnull(is_pl_account, 'No') = 'No'", (self.doc.supplier_type + " - " + abbr)):
|
||||
|
||||
# if not group created , create it
|
||||
self.add_account(self.doc.supplier_type, self.get_payables_group(), abbr)
|
||||
|
||||
Reference in New Issue
Block a user