From 93c67ffd92b4b82683818edeb1902fee74d88197 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 13 Apr 2021 17:55:56 +0530 Subject: [PATCH] fix: sider --- erpnext/regional/india/e_invoice/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 1ca3fff4d1e..7cf3f8cff36 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -372,7 +372,11 @@ def validate_mandatory_fields(invoice): if not frappe.db.get_value('Address', invoice.company_address, 'gstin'): frappe.throw( _('GSTIN is mandatory to fetch company GSTIN details. Please enter GSTIN in selected company address.'), - @@ -348,6 +378,39 @@ def validate_mandatory_fields(invoice): + title=_('Missing Fields') + ) + if invoice.gst_category != 'Overseas' and not frappe.db.get_value('Address', invoice.customer_address, 'gstin'): + frappe.throw( + _('GSTIN is mandatory to fetch customer GSTIN details. Please enter GSTIN in selected customer address.'), title=_('Missing Fields') )