From 5a00285539a34d8ff8d7656e3e0bd4ff8e1f9e1a Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 19 Nov 2008 18:45:36 +0000 Subject: Correcting behavior in threshold handling. Now will select payments at the threshold. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2405 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/Payment.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/modules/Payment.sql') diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql index 34d506cc..6e7ddc4d 100644 --- a/sql/modules/Payment.sql +++ b/sql/modules/Payment.sql @@ -279,7 +279,7 @@ BEGIN e.control_code, c.description HAVING (in_meta_number IS NULL OR in_meta_number = c.meta_number) AND - (sum(p.due) > c.threshold + (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 ASC -- cgit v1.2.3