From 0c26f9a8c8100104cb5ef3923e5cf9e739f3adae Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 4 Apr 2022 12:28:09 +0530 Subject: [PATCH 1/2] fix(india): cannot generate e-invoice for is_pos invoices * If mode of payment > 18 characters, the e-invoice portal throws error --- erpnext/regional/india/e_invoice/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index cbdec564ba..8fd9c1c43d 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -387,7 +387,7 @@ def update_other_charges( def get_payment_details(invoice): payee_name = invoice.company - mode_of_payment = ", ".join([d.mode_of_payment for d in invoice.payments]) + mode_of_payment = "" paid_amount = invoice.base_paid_amount outstanding_amount = invoice.outstanding_amount From b91bf40f1bb11162f5589f7bde408e266f3d89bd Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 4 Apr 2022 14:40:07 +0530 Subject: [PATCH 2/2] fix: server error while viewing gst e-invoice --- .../print_format/gst_e_invoice/gst_e_invoice.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html index e658049309..605ce8383e 100644 --- a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html +++ b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html @@ -1,7 +1,8 @@ {%- from "templates/print_formats/standard_macros.html" import add_header, render_field, print_value -%} -{%- set einvoice = json.loads(doc.signed_einvoice) -%}
+ {% if doc.signed_einvoice %} + {%- set einvoice = json.loads(doc.signed_einvoice) -%}
{% if letter_head and not no_letterhead %}
{{ letter_head }}
@@ -170,4 +171,10 @@
+ {% else %} +
+ You must generate IRN before you can preview GST E-Invoice. +
+ {% endif %}
+