Merge pull request #31218 from deepeshgarg007/distinct_gstin
fix(India): GSTIN filter in GSTR-1 report
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index 0bdbe56..6cbc12c 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -1155,8 +1155,11 @@
.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)
)