fix(india): e-invoice generation for registered composition gst category type (#30814)
This commit is contained in:
parent
2b354270eb
commit
80a13c38bc
@ -57,6 +57,7 @@ def validate_eligibility(doc):
|
|||||||
invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")})
|
invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")})
|
||||||
invalid_supply_type = doc.get("gst_category") not in [
|
invalid_supply_type = doc.get("gst_category") not in [
|
||||||
"Registered Regular",
|
"Registered Regular",
|
||||||
|
"Registered Composition",
|
||||||
"SEZ",
|
"SEZ",
|
||||||
"Overseas",
|
"Overseas",
|
||||||
"Deemed Export",
|
"Deemed Export",
|
||||||
@ -124,7 +125,9 @@ def read_json(name):
|
|||||||
|
|
||||||
def get_transaction_details(invoice):
|
def get_transaction_details(invoice):
|
||||||
supply_type = ""
|
supply_type = ""
|
||||||
if invoice.gst_category == "Registered Regular":
|
if (
|
||||||
|
invoice.gst_category == "Registered Regular" or invoice.gst_category == "Registered Composition"
|
||||||
|
):
|
||||||
supply_type = "B2B"
|
supply_type = "B2B"
|
||||||
elif invoice.gst_category == "SEZ":
|
elif invoice.gst_category == "SEZ":
|
||||||
if invoice.export_type == "Without Payment of Tax":
|
if invoice.export_type == "Without Payment of Tax":
|
||||||
@ -140,14 +143,15 @@ def get_transaction_details(invoice):
|
|||||||
supply_type = "DEXP"
|
supply_type = "DEXP"
|
||||||
|
|
||||||
if not supply_type:
|
if not supply_type:
|
||||||
rr, sez, overseas, export = (
|
rr, rc, sez, overseas, export = (
|
||||||
bold("Registered Regular"),
|
bold("Registered Regular"),
|
||||||
|
bold("Registered Composition"),
|
||||||
bold("SEZ"),
|
bold("SEZ"),
|
||||||
bold("Overseas"),
|
bold("Overseas"),
|
||||||
bold("Deemed Export"),
|
bold("Deemed Export"),
|
||||||
)
|
)
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("GST category should be one of {}, {}, {}, {}").format(rr, sez, overseas, export),
|
_("GST category should be one of {}, {}, {}, {}, {}").format(rr, rc, sez, overseas, export),
|
||||||
title=_("Invalid Supply Type"),
|
title=_("Invalid Supply Type"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -762,7 +762,7 @@ def get_custom_fields():
|
|||||||
insert_after="customer",
|
insert_after="customer",
|
||||||
no_copy=1,
|
no_copy=1,
|
||||||
print_hide=1,
|
print_hide=1,
|
||||||
depends_on='eval:in_list(["Registered Regular", "SEZ", "Overseas", "Deemed Export"], doc.gst_category) && doc.irn_cancelled === 0',
|
depends_on='eval:in_list(["Registered Regular", "Registered Composition", "SEZ", "Overseas", "Deemed Export"], doc.gst_category) && doc.irn_cancelled === 0',
|
||||||
),
|
),
|
||||||
dict(
|
dict(
|
||||||
fieldname="irn_cancelled",
|
fieldname="irn_cancelled",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user