[open-ils-commits] r9933 -
branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 25 20:58:59 EDT 2008
Author: miker
Date: 2008-06-25 20:58:58 -0400 (Wed, 25 Jun 2008)
New Revision: 9933
Modified:
branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
proper support for counting short-duration overdue circs
Modified: branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2008-06-26 00:56:13 UTC (rev 9932)
+++ branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2008-06-26 00:58:58 UTC (rev 9933)
@@ -56,6 +56,12 @@
SELECT id
FROM action.circulation
WHERE usr = ? AND checkin_time IS NULL AND due_date >= 'today' AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
+ WHERE usr = ?
+ AND checkin_time IS NULL
+ AND ( (fine_interval >= '1 day' AND due_date >= 'today')
+ OR (fine_interval < '1 day' AND due_date > 'now' ))
+ AND (stop_fines IS NULL
+ OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
SQL
my $out = actor::user->db_Main->selectcol_arrayref($out_sql, {}, $usr);
@@ -63,7 +69,12 @@
my $od_sql = <<" SQL";
SELECT id
FROM action.circulation
- WHERE usr = ? AND checkin_time IS NULL AND due_date < 'today' AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
+ WHERE usr = ?
+ AND checkin_time IS NULL
+ AND ( (fine_interval >= '1 day' AND due_date < 'today')
+ OR (fine_interval < '1 day' AND due_date < 'now' ))
+ AND (stop_fines IS NULL
+ OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
SQL
my $od = actor::user->db_Main->selectcol_arrayref($od_sql, {}, $usr);
More information about the open-ils-commits
mailing list