summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authoraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-31 19:04:59 +0000
committeraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-31 19:04:59 +0000
commit41db8ed11dae7f891481015d2d6022e26ed3ad1e (patch)
tree4d2797e68fe8a87c604364d19931db88a7c32723 /sql
parent63813578b7bcf351a40536b08d5ca0a733b46c8c (diff)
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
Diffstat (limited to 'sql')
-rw-r--r--sql/modules/Payment.sql1
1 files changed, 1 insertions, 0 deletions
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;