From: pines Date: Thu, 14 Sep 2006 16:50:18 +0000 (+0000) Subject: updating total_owed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b87916216e4aa4b56cb7bddf4ef2b6cb85796eda;p=Evergreen.git updating total_owed git-svn-id: svn://svn.open-ils.org/ILS/trunk@6099 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm index 02bbeaed4a..1db2c33c9a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm @@ -32,7 +32,7 @@ sub usr_total_owed { SUM(COALESCE((SELECT SUM(b.amount) FROM money.billing b WHERE b.voided IS FALSE AND b.xact = x.id),0.0)) - SUM(COALESCE((SELECT SUM(p.amount) FROM money.payment p WHERE p.voided IS FALSE AND p.xact = x.id),0.0)) FROM money.billable_xact x - WHERE x.usr = ? + WHERE x.usr = ? AND x.xact_finish IS NULL GROUP BY 1 SQL