Merge pull request #44154 from frappe/mergify/bp/version-14-hotfix/pr-44089

fix: apply posting date sorting to invoices in Payment Reconciliation similar to payments (backport #44089)
This commit is contained in:
ruthra kumar
2024-11-15 10:54:40 +05:30
committed by GitHub

View File

@@ -299,6 +299,10 @@ class PaymentReconciliation(Document):
if self.invoice_limit:
non_reconciled_invoices = non_reconciled_invoices[: self.invoice_limit]
non_reconciled_invoices = sorted(
non_reconciled_invoices, key=lambda k: k["posting_date"] or getdate(nowdate())
)
self.add_invoice_entries(non_reconciled_invoices)
def add_invoice_entries(self, non_reconciled_invoices):