Hi @Smit_Vora
When generating a einvoice/ewb for an export return, the supply type and sub-supply type values are not mentioned correctly. This leads to einv getting generated but ewb fails. Even generating EWB separately doesn’t work as it’s not handled.
I am not sure if EWB for export/export return/import/import return can be generated with Einvoice but at least it should work on separate call.
Currently, in while generating EWB, the doctype = BIL, SupplyType = I, SubSupplyType = 3 (which is export)
As per official mapping doc, this combination is invalid. The only value allowed is doctype = BOE, SupplyType = I, SubSupplyType = 2 (which is import).
utils/e_waybill.py : L1537 : Function (update_transaction_details)
if is_foreign_doc(self.doc):
self.transaction_details.update(sub_supply_type=3) # Export
if not doc.is_export_with_gst:
self.transaction_details.update(document_type="BIL")
if (
doc.doctype in ("Sales Invoice", "Purchase Invoice")
and not doc.is_return
and all(
item.gst_treatment in ("Nil-Rated", "Exempted", "Non-GST")
for item in doc.items
)
):
self.transaction_details.update(document_type="BIL")
if self.doc.doctype == "Purchase Invoice" and not self.doc.is_return:
self.transaction_details.name = self.doc.bill_no or self.doc.name
