From c529cc4c47479cf34ac43f9dc7c73a01b4c459ac Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 16 Aug 2006 21:25:30 +0000 Subject: [PATCH] adding checkin-time check to in-collections activity query git-svn-id: svn://svn.open-ils.org/ILS/trunk@5545 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Storage/Publisher/money.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm index 740180a210..0c55af3dd9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm @@ -83,15 +83,16 @@ sub active_in_collections { LEFT JOIN money.billing bl ON (lt.id = bl.xact) LEFT JOIN money.payment pm ON (lt.id = pm.xact) WHERE cl.location IN ((SELECT id FROM $descendants)) - AND ( bl.billing_ts between ? and ? - OR pm.payment_ts between ? and ? ) + AND ( ( bl.billing_ts between ? and ? + OR pm.payment_ts between ? and ? ) + OR lt.checkin_time between ? and ? ) GROUP BY 1 SQL my @l_ids; for my $l (@loc) { my $sth = money::collections_tracker->db_Main->prepare($SQL); - $sth->execute(uc($l), uc($l), $startdate, $enddate, $startdate, $enddate ); + $sth->execute(uc($l), uc($l), $startdate, $enddate, $startdate, $enddate, $startdate, $enddate ); while (my $row = $sth->fetchrow_hashref) { $row->{usr} = actor::user->retrieve($row->{usr})->to_fieldmapper; $client->respond( $row ); -- 2.43.2