fix(regional): use correct lowercase fieldname in UAE VAT tax accounts

get_tax_accounts fetched fields=['Account'] but the UAE VAT Account fieldname is lowercase account. PostgreSQL treats the double-quoted identifier case-sensitively ('column "Account" does not exist'); MariaDB identifiers are case-insensitive so it worked there. Use the real fieldname account; output unchanged on MariaDB.
This commit is contained in:
Mihir Kandoi
2026-06-23 09:13:52 +05:30
parent 16b27ecdd1
commit f11f8cb005

View File

@@ -77,7 +77,7 @@ def get_account_currency(account):
def get_tax_accounts(company):
"""Get the list of tax accounts for a specific company."""
tax_accounts_dict = frappe._dict()
tax_accounts_list = frappe.get_all("UAE VAT Account", filters={"parent": company}, fields=["Account"])
tax_accounts_list = frappe.get_all("UAE VAT Account", filters={"parent": company}, fields=["account"])
if not tax_accounts_list and not frappe.in_test:
frappe.throw(_('Please set Vat Accounts for Company: "{0}" in UAE VAT Settings').format(company))