From: miker Date: Tue, 6 Nov 2007 02:17:55 +0000 (+0000) Subject: adding a view for overdue circs to simply reporting X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=763304fdc3cabf7175ca31860eebb163fdc2c181;p=Evergreen.git adding a view for overdue circs to simply reporting git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@8015 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 84b0ccea9e..a7f5aa66c8 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -2584,6 +2584,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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;