Skip to content

Commit

Permalink
Merge pull request #2926 from resilient-tech/version-14-hotfix
Browse files Browse the repository at this point in the history
chore: release v14
  • Loading branch information
mergify[bot] authored Jan 6, 2025
2 parents f38b492 + 07ba523 commit b23a57e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
2 changes: 2 additions & 0 deletions india_compliance/gst_india/api_classes/e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class EInvoiceAPI(BaseAPI):
# Cancel IRN errors
"9999": "Invoice is not active",
"4002": "EwayBill is already generated for this IRN",
# IRN Generated in different Portal
"2148": "Requested IRN data is not available",
# Invalid GSTIN error
"3028": "GSTIN is invalid",
"3029": "GSTIN is not active",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_return_status(self):
self.gstin,
self.return_period,
)
self.filing_status = status
self.db_set("filing_status", status)

return status

Expand Down
18 changes: 7 additions & 11 deletions india_compliance/gst_india/overrides/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,12 @@ def get_gst_details(party_details, doctype, company, *, update_place_of_supply=F
gst_details.update(party_gst_details)

# POS
gst_details.place_of_supply = (
party_details.place_of_supply
if (not update_place_of_supply and party_details.place_of_supply)
else get_place_of_supply(party_details, doctype)
)
if not update_place_of_supply and party_details.place_of_supply:
gst_details.place_of_supply = party_details.place_of_supply
else:
place_of_supply = get_place_of_supply(party_details, doctype)
gst_details.place_of_supply = place_of_supply
party_details.place_of_supply = place_of_supply

if is_sales_transaction:
source_gstin = party_details.company_gstin
Expand Down Expand Up @@ -1016,12 +1017,7 @@ def get_gst_details(party_details, doctype, company, *, update_place_of_supply=F
if default_tax := get_tax_template(
master_doctype,
company,
is_inter_state_supply(
party_details.copy().update(
doctype=doctype,
place_of_supply=gst_details.place_of_supply,
)
),
is_inter_state_supply(frappe._dict({**party_details, "doctype": doctype})),
party_details.company_gstin[:2],
party_details.is_reverse_charge,
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ def get_columns(filters):

columns.extend(
[
{
"label": _("Item Qty"),
"fieldname": "qty",
"fieldtype": "Data",
"width": 100,
},
{
"label": _("HSN Code"),
"fieldname": "gst_hsn_code",
Expand Down
5 changes: 5 additions & 0 deletions india_compliance/gst_india/utils/e_waybill.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ def _generate_e_waybill(doc, throw=True, force=False):
if result.error_code == "4002":
result = api(doc).get_e_waybill_by_irn(doc.get("irn"))

if result.error_code == "2148":
with_irn = False
data = EWaybillData(doc).get_data(with_irn=with_irn)
result = EWaybillAPI(doc).generate_e_waybill(data)

except GSPServerError as e:
handle_server_errors(settings, doc, "e-Waybill", e)
return
Expand Down
1 change: 1 addition & 0 deletions india_compliance/gst_india/utils/gstr_1/gstr_1_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ def get_invoices_for_hsn_wise_summary(self):
frappe.qb.from_(query)
.select(
"*",
Sum(query.qty).as_("qty"),
Sum(query.taxable_value).as_("taxable_value"),
Sum(query.cgst_amount).as_("cgst_amount"),
Sum(query.sgst_amount).as_("sgst_amount"),
Expand Down

0 comments on commit b23a57e

Please sign in to comment.