[open-ils-commits] r7505 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 2 16:19:04 EDT 2007
Author: miker
Date: 2007-07-02 16:15:35 -0400 (Mon, 02 Jul 2007)
New Revision: 7505
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm
Log:
Adding bill voiding time to the activity tracking query.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm 2007-07-02 16:37:39 UTC (rev 7504)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm 2007-07-02 20:15:35 UTC (rev 7505)
@@ -210,6 +210,18 @@
MAX(last_pertinent_payment) AS last_pertinent_payment
FROM (
SELECT lt.usr,
+ NULL::TIMESTAMPTZ AS last_pertinent_billing,
+ NULL::TIMESTAMPTZ AS last_pertinent_payment
+ FROM money.grocery lt
+ JOIN money.collections_tracker cl ON (lt.usr = cl.usr)
+ JOIN money.billing bl ON (lt.id = bl.xact)
+ WHERE cl.location = ?
+ AND lt.billing_location IN (XX)
+ AND bl.void_time BETWEEN ? AND ?
+ GROUP BY 1
+
+ UNION ALL
+ SELECT lt.usr,
MAX(bl.billing_ts) AS last_pertinent_billing,
NULL::TIMESTAMPTZ AS last_pertinent_payment
FROM money.grocery lt
@@ -257,6 +269,18 @@
UNION ALL
SELECT lt.usr,
+ NULL::TIMESTAMPTZ AS last_pertinent_billing,
+ NULL::TIMESTAMPTZ AS last_pertinent_payment
+ FROM action.circulation lt
+ JOIN money.collections_tracker cl ON (lt.usr = cl.usr)
+ JOIN money.billing bl ON (lt.id = bl.xact)
+ WHERE cl.location = ?
+ AND lt.circ_lib IN (XX)
+ AND bl.void_time BETWEEN ? AND ?
+ GROUP BY 1
+
+ UNION ALL
+ SELECT lt.usr,
MAX(bl.billing_ts) AS last_pertinent_billing,
NULL::TIMESTAMPTZ AS last_pertinent_payment
FROM action.circulation lt
More information about the open-ils-commits
mailing list