[Minor]Change to maintain args ordering convention
This commit is contained in:
parent
79872bf62c
commit
eba9ca4d66
@ -96,7 +96,7 @@ class GLEntry(Document):
|
||||
frappe.throw(_("Cost Center {0} does not belong to Company {1}").format(self.cost_center, self.company))
|
||||
|
||||
def validate_party(self):
|
||||
validate_party_frozen_disabled(self.party, self.party_type)
|
||||
validate_party_frozen_disabled(self.party_type, self.party)
|
||||
|
||||
def validate_currency(self):
|
||||
company_currency = get_company_currency(self.company)
|
||||
|
@ -309,7 +309,7 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
|
||||
|
||||
return get_tax_template(posting_date, args)
|
||||
|
||||
def validate_party_frozen_disabled(party_name, party_type):
|
||||
def validate_party_frozen_disabled(party_type, party_name):
|
||||
if party_type and party_name:
|
||||
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
|
||||
if party.disabled:
|
||||
|
@ -417,7 +417,7 @@ class AccountsController(TransactionBase):
|
||||
|
||||
def validate_party(self):
|
||||
party_type, party = self.get_party()
|
||||
validate_party_frozen_disabled(party, party_type)
|
||||
validate_party_frozen_disabled(party_type, party)
|
||||
|
||||
def get_party(self):
|
||||
party_type = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user