mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user