Skip to content

Commit

Permalink
Merge pull request #2293 from resilient-tech/mergify/bp/version-15-ho…
Browse files Browse the repository at this point in the history
…tfix/pr-2287

fix: allow address in india with overseas category for high sea sales (backport #2287)
  • Loading branch information
mergify[bot] authored Jun 22, 2024
2 parents 1252a6b + 3f2b7a5 commit 2137e60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 1 addition & 5 deletions india_compliance/gst_india/overrides/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ def validate(doc, method=None):


def validate_overseas_gst_category(doc):
if doc.country == "India" and doc.gst_category == "Overseas":
frappe.throw(
_("Cannot set GST Category as Overseas for Indian Address"),
title=_("Invalid GST Category"),
)
# High Seas Sales is possible (Indian Address with Overseas GST Category)

if doc.country != "India" and doc.gst_category != "Overseas":
frappe.throw(
Expand Down
6 changes: 5 additions & 1 deletion india_compliance/gst_india/overrides/party.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ def set_gst_category(doc):


def fetch_or_guess_gst_category(doc):
# High Seas Sales
if doc.gst_category == "Overseas":
return doc.gst_category

# Any transaction can be treated as deemed export
if doc.gstin and doc.gst_category == "Deemed Export":
return "Deemed Export"
return doc.gst_category

if doc.gstin and is_autofill_party_info_enabled():
gstin_info = _get_gstin_info(doc.gstin, throw_error=False) or {}
Expand Down

0 comments on commit 2137e60

Please sign in to comment.