diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 0bdbe56de6..6cbc12c7a1 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -1155,8 +1155,11 @@ def get_company_gstins(company): .inner_join(links) .on(address.name == links.parent) .select(address.gstin) + .distinct() .where(links.link_doctype == "Company") .where(links.link_name == company) + .where(address.gstin.isnotnull()) + .where(address.gstin != "") .run(as_dict=1) )