From: miker Date: Thu, 26 Jun 2008 00:58:58 +0000 (+0000) Subject: proper support for counting short-duration overdue circs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=53ce29d34812b70ec04603d900e5db5bd3748af6;p=Evergreen.git proper support for counting short-duration overdue circs git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_2@9933 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 14b3e273d5..c83254b4b3 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm @@ -56,6 +56,12 @@ sub usr_breakdown_out { 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 @@ sub usr_breakdown_out { 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);