Skip to content

Commit

Permalink
fix: update HSN validation message for better ux
Browse files Browse the repository at this point in the history
  • Loading branch information
vorasmit committed Dec 16, 2024
1 parent a8e5490 commit 94d200f
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit 94d200f

Please sign in to comment.