summaryrefslogtreecommitdiff
path: root/sql/modules
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-12 16:39:00 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-12 16:39:00 +0000
commit0a21178170ff1917204172a7cc1c3f7e73b8f379 (patch)
tree116966af6c93112c16cac3b8924c381da8e78647 /sql/modules
parentbca5826c5485e2c1f3d8cfdf36f247826ea4afed (diff)
Undoing svn commit rev 2250
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2251 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules')
-rw-r--r--sql/modules/Payment.sql7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql
index bee243f8..2a7e6e56 100644
--- a/sql/modules/Payment.sql
+++ b/sql/modules/Payment.sql
@@ -187,12 +187,7 @@ BEGIN
FOR payment_item IN
SELECT c.id AS contact_id, e.name AS contact_name,
c.meta_number AS account_number,
- sum (coalesce(p.due, 0) -
- CASE WHEN c.discount_terms
- > extract('days' FROM age(a.transdate))
- THEN 0
- ELSE (coalesce(p.due, 0)) * coalesce(c.discount, 0) / 100
- END) AS total_due,
+ sum(p.due) AS total_due,
compound_array(ARRAY[[
a.id::text, a.invnumber, a.transdate::text,
a.amount::text, (a.amount - p.due)::text,