Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

item_name instead of item_code in create XML #6

Open
wants to merge 2 commits into
base: multi-company
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions zatca2024/zatca2024/createxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def item_data(invoice,sales_invoice_doc):
cbc_RoundingAmount.text=str(abs(round(single_item.base_net_amount + (item_tax_percentage * single_item.base_net_amount / 100),2)))
cac_Item = ET.SubElement(cac_InvoiceLine, "cac:Item")
cbc_Name = ET.SubElement(cac_Item, "cbc:Name")
cbc_Name.text = single_item.item_code
cbc_Name.text = single_item.item_name
cac_ClassifiedTaxCategory = ET.SubElement(cac_Item, "cac:ClassifiedTaxCategory")
cbc_ID_11 = ET.SubElement(cac_ClassifiedTaxCategory, "cbc:ID")
if sales_invoice_doc.custom_zatca_tax_category == "Standard":
Expand Down Expand Up @@ -651,4 +651,7 @@ def xml_structuring(invoice,sales_invoice_doc):
except Exception as e:
frappe.throw(frappe.get_traceback())
except Exception as e:
frappe.throw("Error occured in XML structuring and attach. Please contact your system administrator"+ str(e) )
frappe.throw(
"Error occured in XML structuring and attach. Please contact your system administrator"
+ str(e)
)