Skip to content

Commit

Permalink
fix: reconciled credit notes being fetched again in Payment Reconcili…
Browse files Browse the repository at this point in the history
…ation tool (#33471)

fix: reconciled cr note showing up as Payments
(cherry picked from commit 5ec11ba)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Dec 29, 2022
1 parent cbda28d commit 37ae2df
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -172,22 +172,22 @@ def get_dr_or_cr_notes(self):
query = (
qb.from_(gl)
.select(
gl.voucher_type.as_("reference_type"),
gl.voucher_no.as_("reference_name"),
gl.against_voucher_type.as_("reference_type"),
gl.against_voucher.as_("reference_name"),
(Sum(dr_or_cr) - Sum(reconciled_dr_or_cr)).as_("amount"),
gl.posting_date,
gl.account_currency.as_("currency"),
)
.where(
(gl.voucher_type == voucher_type)
& (gl.voucher_no.isin(sub_query))
(gl.against_voucher.isin(sub_query))
& (gl.against_voucher_type == voucher_type)
& (gl.is_cancelled == 0)
& (gl.account == self.receivable_payable_account)
& (gl.party_type == self.party_type)
& (gl.party == self.party)
)
.where(Criterion.all(conditions))
.groupby(gl.voucher_no)
.groupby(gl.against_voucher)
.having(qb.Field("amount") > 0)
)
dr_cr_notes = query.run(as_dict=True)
Expand Down

1 comment on commit 37ae2df

@dineshpanchal93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruthra-kumar Thank for the update .. Resolved issue in Credit Note

Also we have an issue in the debit note as well.

We have Debit Invoice ( Return Invoice against Supplier ) that is not fetching in Payment Reco

Please sign in to comment.