Skip to content

Commit

Permalink
fix: check company_name in purchase invoice and boe
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Aug 7, 2024
1 parent a0108de commit 9d2cffc
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,9 @@ def get_query(self, additional_fields=None, is_return=False):
)
)

if self.company:
query = query.where(self.company == self.PI.company)

if self.company_gstin == "All":
query = query.where(self.PI.company_gstin.notnull())
else:
Expand Down Expand Up @@ -587,6 +590,14 @@ def get_query(self, additional_fields=None):
.select(*fields, ConstantColumn("Bill of Entry").as_("doctype"))
)

if self.company:
query = query.where(self.company == self.BOE.company)

if self.company_gstin == "All":
query = query.where(self.BOE.company_gstin.notnull())
else:
query = query.where(self.company_gstin == self.BOE.company_gstin)

if self.include_ignored == 0:
query = query.where(IfNull(self.BOE.reconciliation_status, "") != "Ignored")

Expand Down

0 comments on commit 9d2cffc

Please sign in to comment.