chore(UAE VAT 21): rename report
diff --git a/erpnext/accounts/desk_page/accounting/accounting.json b/erpnext/accounts/desk_page/accounting/accounting.json
index 214e31f..7d25b27 100644
--- a/erpnext/accounts/desk_page/accounting/accounting.json
+++ b/erpnext/accounts/desk_page/accounting/accounting.json
@@ -83,7 +83,7 @@
{
"hidden": 0,
"label": "Value-Added Tax (VAT UAE)",
- "links": "[\n {\n \"label\": \"UAE VAT Setting\",\n \"name\": \"UAE VAT Setting\",\n \"type\": \"doctype\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"UAE VAT 21\",\n \"name\": \"UAE VAT 21\",\n \"type\": \"report\"\n }\n]"
+ "links": "[\n {\n \"label\": \"UAE VAT Setting\",\n \"name\": \"UAE VAT Setting\",\n \"type\": \"doctype\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"UAE VAT 201\",\n \"name\": \"UAE VAT 201\",\n \"type\": \"report\"\n }\n]"
}
],
"category": "Modules",
diff --git a/erpnext/regional/report/uae_vat_21/__init__.py b/erpnext/regional/report/uae_vat_201/__init__.py
similarity index 100%
rename from erpnext/regional/report/uae_vat_21/__init__.py
rename to erpnext/regional/report/uae_vat_201/__init__.py
diff --git a/erpnext/regional/report/uae_vat_21/uae_vat_21.html b/erpnext/regional/report/uae_vat_201/uae_vat_201.html
similarity index 100%
rename from erpnext/regional/report/uae_vat_21/uae_vat_21.html
rename to erpnext/regional/report/uae_vat_201/uae_vat_201.html
diff --git a/erpnext/regional/report/uae_vat_21/uae_vat_21.js b/erpnext/regional/report/uae_vat_201/uae_vat_201.js
similarity index 95%
rename from erpnext/regional/report/uae_vat_21/uae_vat_21.js
rename to erpnext/regional/report/uae_vat_201/uae_vat_201.js
index 5fc5449..5957424 100644
--- a/erpnext/regional/report/uae_vat_21/uae_vat_21.js
+++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.js
@@ -2,7 +2,7 @@
// For license information, please see license.txt
/* eslint-disable */
-frappe.query_reports["UAE VAT 21"] = {
+frappe.query_reports["UAE VAT 201"] = {
"filters": [
{
"fieldname": "company",
diff --git a/erpnext/regional/report/uae_vat_21/uae_vat_21.json b/erpnext/regional/report/uae_vat_201/uae_vat_201.json
similarity index 88%
rename from erpnext/regional/report/uae_vat_21/uae_vat_21.json
rename to erpnext/regional/report/uae_vat_201/uae_vat_201.json
index 421990c..8a88bcd 100644
--- a/erpnext/regional/report/uae_vat_21/uae_vat_21.json
+++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.json
@@ -12,11 +12,11 @@
"modified": "2020-09-10 08:51:02.298482",
"modified_by": "Administrator",
"module": "Regional",
- "name": "UAE VAT 21",
+ "name": "UAE VAT 201",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "GL Entry",
- "report_name": "UAE VAT 21",
+ "report_name": "UAE VAT 201",
"report_type": "Script Report",
"roles": []
}
\ No newline at end of file
diff --git a/erpnext/regional/report/uae_vat_21/uae_vat_21.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py
similarity index 98%
rename from erpnext/regional/report/uae_vat_21/uae_vat_21.py
rename to erpnext/regional/report/uae_vat_201/uae_vat_201.py
index 227c2fb..bcd3135 100644
--- a/erpnext/regional/report/uae_vat_21/uae_vat_21.py
+++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py
@@ -279,7 +279,7 @@
select sum(total) from
`tabPurchase Invoice`
where
- standard_rated_expenses > 0
+ claimable_standard_rated_expenses > 0
and docstatus = 1 {where_conditions} ;
""".format(where_conditions=conditions), filters)[0][0] or 0
@@ -287,10 +287,10 @@
"""Returns the sum of the tax of each Purchase invoice made."""
conditions = get_conditions(filters)
return frappe.db.sql("""
- select sum(standard_rated_expenses) from
+ select sum(claimable_standard_rated_expenses) from
`tabPurchase Invoice`
where
- standard_rated_expenses > 0
+ claimable_standard_rated_expenses > 0
and docstatus = 1 {where_conditions} ;
""".format(where_conditions=conditions), filters)[0][0] or 0
diff --git a/erpnext/regional/united_arab_emirates/setup.py b/erpnext/regional/united_arab_emirates/setup.py
index e48b9a9..a0e7620 100644
--- a/erpnext/regional/united_arab_emirates/setup.py
+++ b/erpnext/regional/united_arab_emirates/setup.py
@@ -38,11 +38,11 @@
dict(fieldname='supplier_name_in_arabic', label='Supplier Name in Arabic',
fieldtype='Read Only', insert_after='supplier_name',
fetch_from='supplier.supplier_name_in_arabic', print_hide=1),
- dict(fieldname='standard_rated_expenses', label='Standard Rated Expenses (AED)',
+ dict(fieldname='claimable_standard_rated_expenses', label='Claimable Standard Rated Expenses (AED)',
insert_after='permit_no', fieldtype='Currency', print_hide=1, default='0',
depends_on="eval:doc.reverse_charge=='N'",),
dict(fieldname='reverse_charge', label='Reverse Charge Applicable',
- fieldtype='Select', insert_after='standard_rated_expenses', print_hide=1,
+ fieldtype='Select', insert_after='claimable_standard_rated_expenses', print_hide=1,
options='Y\nN', default='N'),
dict(fieldname='claimable_reverse_charge', label='Claimable Reverse Charge (Percentage)',
insert_after='reverse_charge', fieldtype='Percent', print_hide=1,
@@ -132,11 +132,11 @@
name in('Simplified Tax Invoice', 'Detailed Tax Invoice', 'Tax Invoice') """)
def add_custom_roles_for_reports():
- """Add Access Control to UAE VAT 21."""
- if not frappe.db.get_value('Custom Role', dict(report='UAE VAT 21')):
+ """Add Access Control to UAE VAT 201."""
+ if not frappe.db.get_value('Custom Role', dict(report='UAE VAT 201')):
frappe.get_doc(dict(
doctype='Custom Role',
- report='UAE VAT 21',
+ report='UAE VAT 201',
roles= [
dict(role='Accounts User'),
dict(role='Accounts Manager'),
diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py
index dbe283f..37501a2 100644
--- a/erpnext/regional/united_arab_emirates/utils.py
+++ b/erpnext/regional/united_arab_emirates/utils.py
@@ -145,11 +145,7 @@
def validate_returns(doc, method):
"""Standard Rated expenses should not be set when Reverse Charge Applicable is set."""
country = frappe.get_cached_value('Company', doc.company, 'country')
- print("-"*50)
- print(doc.reverse_charge)
- print(flt(doc.standard_rated_expenses))
if country != 'United Arab Emirates':
return
-
- if doc.reverse_charge == 'Y' and flt(doc.standard_rated_expenses) != 0:
- frappe.throw(_("Standard Rated expenses should not be set when Reverse Charge Applicable is Y"))
\ No newline at end of file
+ if doc.reverse_charge == 'Y' and flt(doc.claimable_standard_rated_expenses) != 0:
+ frappe.throw(_("Claimable Standard Rated expenses should not be set when Reverse Charge Applicable is Y"))
\ No newline at end of file