Skip to content

Commit

Permalink
fix: filter inward supply with company with tentetive gstins
Browse files Browse the repository at this point in the history
  • Loading branch information
vorasmit committed Aug 22, 2024
1 parent 9d2cffc commit e2447f8
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from frappe.utils import add_months, format_date, getdate, rounded

from india_compliance.gst_india.constants import GST_TAX_TYPES
from india_compliance.gst_india.utils import get_party_for_gstin
from india_compliance.gst_india.utils import get_gstin_list, get_party_for_gstin
from india_compliance.gst_india.utils.gstr_2 import IMPORT_CATEGORY, ReturnType


Expand Down Expand Up @@ -306,7 +306,12 @@ def get_query(self, additional_fields=None):
)

if self.company_gstin == "All":
query = query.where(self.GSTR2.company_gstin.notnull())
if self.company:
gstin_list = get_gstin_list(self.company)
query = query.where(self.GSTR2.company_gstin.isin(gstin_list))
else:
query = query.where(self.GSTR2.company_gstin.notnull())

else:
query = query.where(self.company_gstin == self.GSTR2.company_gstin)

Expand Down

0 comments on commit e2447f8

Please sign in to comment.