From 289650748c727b51c5033478f501414c9c3fa834 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 16 Oct 2021 17:09:37 +0530 Subject: [PATCH] fix: Interstate internal transfer invoices not visible in GSTR-1 (cherry picked from commit d9d42b13ab70f4677a5e8ba45af1cbaf484dedc4) --- erpnext/regional/report/gstr_1/gstr_1.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 23924c5fb66a..7d401bab6692 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -172,13 +172,6 @@ def get_invoice_data(self): self.invoices = frappe._dict() conditions = self.get_conditions() - company_gstins = get_company_gstin_number(self.filters.get('company'), all_gstins=True) - - if company_gstins: - self.filters.update({ - 'company_gstins': company_gstins - }) - invoice_data = frappe.db.sql(""" select {select_columns} @@ -242,7 +235,7 @@ def get_conditions(self): elif self.filters.get("type_of_business") == "EXPORT": conditions += """ AND is_return !=1 and gst_category = 'Overseas' """ - conditions += " AND IFNULL(billing_address_gstin, '') NOT IN %(company_gstins)s" + conditions += " AND IFNULL(billing_address_gstin, '') != company_gstin" return conditions