Merge pull request #17102 from hrwX/hsn_india_v12
fix(India): HSN Code
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index 6dc95b2..8ce0964 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -81,9 +81,9 @@
"description": "Sales pipeline, leads, opportunities and customers."
},
{
- "module_name": "Help Desk",
+ "module_name": "Support",
"category": "Modules",
- "label": _("Help Desk"),
+ "label": _("Support"),
"color": "#1abc9c",
"icon": "fa fa-check-square-o",
"type": "module",
diff --git a/erpnext/config/help_desk.py b/erpnext/config/help_desk.py
deleted file mode 100644
index c19dd42..0000000
--- a/erpnext/config/help_desk.py
+++ /dev/null
@@ -1,82 +0,0 @@
-from __future__ import unicode_literals
-from frappe import _
-
-def get_data():
- return [
- {
- "label": _("Issues"),
- "items": [
- {
- "type": "doctype",
- "name": "Issue",
- "description": _("Support queries from customers."),
- "onboard": 1,
- },
- {
- "type": "doctype",
- "name": "Communication",
- "description": _("Communication log."),
- "onboard": 1,
- },
- ]
- },
- {
- "label": _("Warranty"),
- "items": [
- {
- "type": "doctype",
- "name": "Warranty Claim",
- "description": _("Warranty Claim against Serial No."),
- },
- {
- "type": "doctype",
- "name": "Serial No",
- "description": _("Single unit of an Item."),
- },
- ]
- },
- {
- "label": _("Service Level Agreement"),
- "items": [
- {
- "type": "doctype",
- "name": "Employee Group",
- "description": _("Support Team."),
- },
- {
- "type": "doctype",
- "name": "Service Level",
- "description": _("Service Level."),
- },
- {
- "type": "doctype",
- "name": "Service Level Agreement",
- "description": _("Service Level Agreement."),
- }
- ]
- },
- {
- "label": _("Reports"),
- "icon": "fa fa-list",
- "items": [
- {
- "type": "page",
- "name": "support-analytics",
- "label": _("Support Analytics"),
- "icon": "fa fa-bar-chart"
- },
- {
- "type": "report",
- "name": "Minutes to First Response for Issues",
- "doctype": "Issue",
- "is_query_report": True
- },
- {
- "type": "report",
- "name": "Support Hours",
- "doctype": "Issue",
- "is_query_report": True
- },
- ]
- },
- ]
\ No newline at end of file
diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py
index f517a5e..0f009b8 100644
--- a/erpnext/config/hr.py
+++ b/erpnext/config/hr.py
@@ -289,6 +289,11 @@
},
{
"type": "doctype",
+ "name": "Expense Claim",
+ "dependencies": ["Employee"]
+ },
+ {
+ "type": "doctype",
"name": "Loan Type",
},
{
@@ -296,6 +301,10 @@
"name": "Loan Application",
"dependencies": ["Employee"]
},
+ {
+ "type": "doctype",
+ "name": "Loan"
+ }
]
},
{
diff --git a/erpnext/config/support.py b/erpnext/config/support.py
index 3980b42..c19dd42 100644
--- a/erpnext/config/support.py
+++ b/erpnext/config/support.py
@@ -10,11 +10,13 @@
"type": "doctype",
"name": "Issue",
"description": _("Support queries from customers."),
+ "onboard": 1,
},
{
"type": "doctype",
"name": "Communication",
"description": _("Communication log."),
+ "onboard": 1,
},
]
},
@@ -34,6 +36,26 @@
]
},
{
+ "label": _("Service Level Agreement"),
+ "items": [
+ {
+ "type": "doctype",
+ "name": "Employee Group",
+ "description": _("Support Team."),
+ },
+ {
+ "type": "doctype",
+ "name": "Service Level",
+ "description": _("Service Level."),
+ },
+ {
+ "type": "doctype",
+ "name": "Service Level Agreement",
+ "description": _("Service Level Agreement."),
+ }
+ ]
+ },
+ {
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
@@ -57,24 +79,4 @@
},
]
},
- {
- "label": _("Service Level Agreement"),
- "items": [
- {
- "type": "doctype",
- "name": "Employee Group",
- "description": _("Support Team."),
- },
- {
- "type": "doctype",
- "name": "Service Level",
- "description": _("Service Level."),
- },
- {
- "type": "doctype",
- "name": "Service Level Agreement",
- "description": _("Service Level Agreement."),
- }
- ]
- },
- ]
+ ]
\ No newline at end of file
diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py
index e1a4c67..876bdcf 100644
--- a/erpnext/regional/italy/utils.py
+++ b/erpnext/regional/italy/utils.py
@@ -5,6 +5,7 @@
from erpnext.controllers.taxes_and_totals import get_itemised_tax
from frappe import _
from frappe.core.doctype.file.file import remove_file
+from six import string_types
from frappe.desk.form.load import get_attachments
from erpnext.regional.italy import state_codes
@@ -151,7 +152,7 @@
tax_amount=(reference_row.tax_amount * tax.rate) / 100,
net_amount=reference_row.tax_amount,
taxable_amount=reference_row.tax_amount,
- item_tax_rate="{}",
+ item_tax_rate={tax.account_head: tax.rate},
charges=True
)
)
@@ -159,10 +160,16 @@
#Check item tax rates if tax rate is zero.
if tax.rate == 0:
for item in items:
- item_tax_rate = json.loads(item.item_tax_rate)
- if tax.account_head in item_tax_rate:
+ item_tax_rate = item.item_tax_rate
+ if isinstance(item.item_tax_rate, string_types):
+ item_tax_rate = json.loads(item.item_tax_rate)
+
+ if item_tax_rate and tax.account_head in item_tax_rate:
key = cstr(item_tax_rate[tax.account_head])
- summary_data.setdefault(key, {"tax_amount": 0.0, "taxable_amount": 0.0, "tax_exemption_reason": "", "tax_exemption_law": ""})
+ if key not in summary_data:
+ summary_data.setdefault(key, {"tax_amount": 0.0, "taxable_amount": 0.0,
+ "tax_exemption_reason": "", "tax_exemption_law": ""})
+
summary_data[key]["tax_amount"] += item.tax_amount
summary_data[key]["taxable_amount"] += item.net_amount
if key == "0.0":