diff --git a/app/modules/accounting/accounting_mirror_service.py b/app/modules/accounting/accounting_mirror_service.py index 0e29802..685bbd8 100644 --- a/app/modules/accounting/accounting_mirror_service.py +++ b/app/modules/accounting/accounting_mirror_service.py @@ -596,7 +596,7 @@ def sundry_creditors_aging( # Non-purchase credits remain visibly distinguished in the drill-down; # they are not represented as purchase bills. closing_lots = sorted( - closing_lots + non_purchase_credit_lots, + closing_lots, key=lambda lot: ( _parse_date(lot.get("voucher_date")) or opening_fallback_date, str(lot.get("voucher_number") or ""),