From 1fd20ad43ed356607c147ba1d6d2c93a93a70914 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 6 Nov 2007 02:20:44 +0000 Subject: [PATCH] adding a view for overdue circs to simplify reporting git-svn-id: svn://svn.open-ils.org/ILS/trunk@8016 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 56 ++++++++++++++++++++++++++++++++- Open-ILS/src/sql/Pg/reporter-schema.sql | 7 +++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 626c8faa86..0832d209a6 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -97,7 +97,6 @@ - @@ -2646,6 +2645,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/sql/Pg/reporter-schema.sql b/Open-ILS/src/sql/Pg/reporter-schema.sql index 8e1684c457..caf7a2025e 100644 --- a/Open-ILS/src/sql/Pg/reporter-schema.sql +++ b/Open-ILS/src/sql/Pg/reporter-schema.sql @@ -206,5 +206,12 @@ SELECT b.xact, FROM money.payment b GROUP BY 1; +CREATE OR REPLACE VIEW reporter.overdue_circs AS +SELECT * + FROM "action".circulation + WHERE checkin_time is null + AND (stop_fines NOT IN ('LOST','CLAIMSRETURNED') OR stop_fines IS NULL) + AND due_date < now(); + COMMIT; -- 2.11.0