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

fix: update error message for HSN validation #2869

Closed
Closed
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions india_compliance/gst_india/overrides/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,7 @@ def validate_fields_and_set_status_for_e_invoice(doc, gst_settings=None):
)

# Mandatory for e-Invoice before save
_validate_hsn_codes(
doc,
valid_hsn_length=[6, 8],
message=_("Since HSN/SAC Code is mandatory for generating e-Invoices.<br>"),
)
_validate_hsn_codes(doc, valid_hsn_length=[6, 8])

if is_foreign_doc(doc):
country = frappe.db.get_value("Address", doc.customer_address, "country")
Expand Down
8 changes: 1 addition & 7 deletions india_compliance/gst_india/utils/transaction_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,7 @@ def validate_transaction(self):
title=_("Invalid Data"),
)

_validate_hsn_codes(
self.doc,
valid_hsn_length=[6, 8],
message=_(
"Since HSN/SAC Code is mandatory for generating e-Waybill/e-Invoices.<br>"
),
)
_validate_hsn_codes(self.doc, valid_hsn_length=[6, 8])

def get_all_item_details(self):
all_item_details = []
Expand Down
Loading