From 41db8ed11dae7f891481015d2d6022e26ed3ad1e Mon Sep 17 00:00:00 2001 From: aurynn_cmd Date: Thu, 31 Jul 2008 19:04:59 +0000 Subject: Add the ORDER BY to payment_get_all_contact_invoices, to correctly sort by meta_number/vendor_number. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2227 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/Payment.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'sql') diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql index b1093305..1af67e9b 100644 --- a/sql/modules/Payment.sql +++ b/sql/modules/Payment.sql @@ -269,6 +269,7 @@ BEGIN (sum(p.due) > c.threshold OR sum(case when a.batch_id = in_batch_id then 1 else 0 END) > 0) + ORDER BY c.meta_number DESC LOOP RETURN NEXT payment_item; END LOOP; -- cgit v1.2.3