fix: apply posting date sorting to invoices in Payment Reconciliation similar to payments

This commit is contained in:
UmakanthKaspa
2024-11-11 09:18:09 +00:00
parent c81eb6c824
commit 0bd83d920d

View File

@@ -370,7 +370,11 @@ 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):