chore(UAE VAT 201): Rename emirate to vat emirate
diff --git a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py
index 3b5d388..3037a07 100644
--- a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py
+++ b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py
@@ -190,7 +190,7 @@
"description": "VAT 5% @ 5.0",
"rate": 5.0
})
- si.emirate = 'Dubai'
+ si.vat_emirate = 'Dubai'
si.submit()
si = create_sales_invoice(company="_Test Company UAE VAT",
@@ -205,7 +205,7 @@
item = "_Test UAE VAT Item",
do_not_save=1
)
- si.emirate = 'Sharjah'
+ si.vat_emirate = 'Sharjah'
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "VAT 5% - _TCUV",
@@ -230,7 +230,7 @@
si.tourist_tax_return = 2
- si.emirate = 'Dubai'
+ si.vat_emirate = 'Dubai'
si.append("taxes", {
"charge_type": "On Net Total",
@@ -253,7 +253,7 @@
item = "_Test UAE VAT Zero Rated Item",
do_not_save=1
)
- si.emirate = 'Sharjah'
+ si.vat_emirate = 'Sharjah'
si.submit()
si = create_sales_invoice(company="_Test Company UAE VAT",
@@ -268,7 +268,7 @@
item = "_Test UAE VAT Exempt Item",
do_not_save=1
)
- si.emirate = 'Sharjah'
+ si.vat_emirate = 'Sharjah'
si.submit()
def create_purchase_invoices():
diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py
index 5bed0e2..ddbdf96 100644
--- a/erpnext/regional/report/uae_vat_201/uae_vat_201.py
+++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py
@@ -147,9 +147,9 @@
def get_total_emiratewise(filters):
"""Returns Emiratewise Amount and Taxes."""
return frappe.db.sql(f"""
- select emirate, sum(total), sum(total_taxes_and_charges) from `tabSales Invoice`
+ select vat_emirate as emirate, sum(total), sum(total_taxes_and_charges) from `tabSales Invoice`
where docstatus = 1 {get_conditions(filters)}
- group by `tabSales Invoice`.emirate;
+ group by `tabSales Invoice`.vat_emirate;
""", filters)
def get_emirates():
diff --git a/erpnext/regional/united_arab_emirates/setup.py b/erpnext/regional/united_arab_emirates/setup.py
index c1188d6..62156e4 100644
--- a/erpnext/regional/united_arab_emirates/setup.py
+++ b/erpnext/regional/united_arab_emirates/setup.py
@@ -55,10 +55,10 @@
dict(fieldname='customer_name_in_arabic', label='Customer Name in Arabic',
fieldtype='Read Only', insert_after='customer_name',
fetch_from='customer.customer_name_in_arabic', print_hide=1),
- dict(fieldname='emirate', label='Emirate', insert_after='permit_no', fieldtype='Select',
+ dict(fieldname='vat_emirate', label='VAT Emirate', insert_after='permit_no', fieldtype='Select',
options='\nAbu Dhabi\nAjman\nDubai\nFujairah\nRas Al Khaimah\nSharjah\nUmm Al Quwain'),
dict(fieldname='tourist_tax_return', label='Tax Refund provided to Tourists (AED)',
- insert_after='emirate', fieldtype='Currency', print_hide=1, default='0'),
+ insert_after='vat_emirate', fieldtype='Currency', print_hide=1, default='0'),
]
invoice_item_fields = [