[Refactor]Changed variable name to avoid conflict between args and local variable
This commit is contained in:
parent
c8ac3b042b
commit
79872bf62c
@ -309,12 +309,12 @@ 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, party_type):
|
||||
if party_type and party:
|
||||
party = frappe.db.get_value(party_type, party, ["is_frozen", "disabled"], as_dict=True)
|
||||
def validate_party_frozen_disabled(party_name, party_type):
|
||||
if party_type and party_name:
|
||||
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
|
||||
if party.disabled:
|
||||
frappe.throw("{0} {1} is disabled".format(party_type, party), PartyDisabled)
|
||||
frappe.throw("{0} {1} is disabled".format(party_type, party_name), PartyDisabled)
|
||||
elif party.is_frozen:
|
||||
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
|
||||
if not frozen_accounts_modifier in frappe.get_roles():
|
||||
frappe.throw("{0} {1} is frozen".format(party_type, party), PartyFrozen)
|
||||
frappe.throw("{0} {1} is frozen".format(party_type, party_name), PartyFrozen)
|
||||
|
Loading…
x
Reference in New Issue
Block a user