fix: apply posting date sorting to invoices in Payment Reconciliation similar to payments
This commit is contained in:
@@ -370,7 +370,11 @@ class PaymentReconciliation(Document):
|
|||||||
|
|
||||||
if self.invoice_limit:
|
if self.invoice_limit:
|
||||||
non_reconciled_invoices = non_reconciled_invoices[: 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)
|
self.add_invoice_entries(non_reconciled_invoices)
|
||||||
|
|
||||||
def add_invoice_entries(self, non_reconciled_invoices):
|
def add_invoice_entries(self, non_reconciled_invoices):
|
||||||
|
|||||||
Reference in New Issue
Block a user