From: miker Date: Tue, 26 Jul 2005 16:12:29 +0000 (+0000) Subject: updating views X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=255c008991cda156d26d6f321753703def1dcb7b;p=Evergreen.git updating views git-svn-id: svn://svn.open-ils.org/ILS/trunk@1484 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index 457a8ffe05..e04a2b2500 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -71,17 +71,17 @@ CREATE TABLE action.circulation ( ) INHERITS (money.billable_xact); CREATE INDEX circ_open_xacts_idx ON action.circulation (usr) WHERE xact_finish IS NULL; -CREATE VIEW action.open_circulation AS +CREATE OR REPLACE VIEW action.open_circulation AS SELECT * FROM action.circulation WHERE xact_finish IS NULL AND ( stop_fines IS NULL OR - stop_fines IN ('CLAIMSRETURNED','MAXFINES','LONGOVERDUE') + stop_fines NOT IN ('CHECKIN','RENEW') ) ORDER BY due_date; -CREATE OR REPLACE VIEW action.open_cirulations AS +CREATE OR REPLACE VIEW action.billable_cirulations AS SELECT * FROM action.circulation WHERE xact_finish IS NULL; @@ -94,9 +94,6 @@ BEGIN IF NEW.stop_fines <> OLD.stop_fines AND NEW.stop_fines = 'LOST' THEN UPDATE asset.copy SET status = 3 WHERE id = NEW.target_copy; END IF; - IF NEW.stop_fines <> OLD.stop_fines AND NEW.stop_fines = 'MISSING' THEN - UPDATE asset.copy SET status = 4 WHERE id = NEW.target_copy; - END IF; RETURN NEW; END; $$ LANGUAGE 'plpgsql';