mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
refactor: suggested changes
This commit is contained in:
@@ -57,16 +57,16 @@ class Supplier(TransactionBase):
|
||||
self.payment_terms = ""
|
||||
self.accounts = []
|
||||
|
||||
if not self.accounts and doc.accounts:
|
||||
if doc.accounts:
|
||||
for account in doc.accounts:
|
||||
child = self.append('accounts')
|
||||
child.company = account.company
|
||||
child.account = account.account
|
||||
self.save()
|
||||
|
||||
if not self.payment_terms and doc.payment_terms:
|
||||
if doc.payment_terms:
|
||||
self.payment_terms = doc.payment_terms
|
||||
|
||||
self.save()
|
||||
|
||||
def validate_internal_supplier(self):
|
||||
internal_supplier = frappe.db.get_value("Supplier",
|
||||
|
||||
Reference in New Issue
Block a user