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 HSN validation message for better ux #2873

Open
wants to merge 1 commit into
base: develop
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
10 changes: 7 additions & 3 deletions india_compliance/gst_india/overrides/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,13 @@ def _validate_hsn_codes(doc, valid_hsn_length, throw=False, message=None):
frappe.throw(
_(
"{0}"
"Please enter a valid HSN/SAC code for the following row numbers:"
" <br>{1}"
).format(message or "", frappe.bold(", ".join(rows_with_invalid_hsn))),
"HSN/SAC must exist and should be {1} digits long"
" for the following row numbers: <br>{2}"
).format(
message or "",
join_list_with_custom_separators(valid_hsn_length),
frappe.bold(", ".join(rows_with_invalid_hsn)),
),
title=_("Invalid HSN/SAC"),
)

Expand Down
Loading