From 75afcf7d1065614c27ddd62e2f85aa825cd5752e Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 26 Jun 2008 00:55:58 +0000 Subject: [PATCH] proper support for counting short-duration overdue circs git-svn-id: svn://svn.open-ils.org/ILS/trunk@9931 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Storage/Publisher/actor.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 cc1d3ec090..8cd9f24133 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); -- 2.43.2