fix: set frappe.flags.company to call regional code accurately

This commit is contained in:
Sagar Vora 2023-04-04 17:49:50 +05:30
parent 76c4d9011f
commit 17ef3c964f
2 changed files with 4 additions and 0 deletions

View File

@ -259,6 +259,8 @@ def set_address_details(
)
if doctype in TRANSACTION_TYPES:
# required to set correct region
frappe.flags.company = company
get_regional_address_details(party_details, doctype, company)
return party_address, shipping_address

View File

@ -976,6 +976,8 @@ def get_itemised_tax_breakup_html(doc):
@frappe.whitelist()
def get_round_off_applicable_accounts(company, account_list):
# required to set correct region
frappe.flags.company = company
account_list = get_regional_round_off_accounts(company, account_list)
return account_list