3 INSERT INTO config.upgrade_log (version) VALUES ('0128');
5 DROP VIEW money.open_usr_circulation_summary;
6 DROP VIEW money.open_usr_summary;
7 DROP VIEW money.open_billable_xact_summary;
9 CREATE OR REPLACE VIEW money.billable_xact_summary AS
10 SELECT * FROM money.materialized_billable_xact_summary;
12 CREATE OR REPLACE VIEW money.open_billable_xact_summary AS
13 SELECT * FROM money.billable_xact_summary_location_view
14 WHERE xact_finish IS NULL;
16 CREATE OR REPLACE VIEW money.open_usr_circulation_summary AS
19 SUM(total_paid) AS total_paid,
20 SUM(total_owed) AS total_owed,
21 SUM(balance_owed) AS balance_owed
22 FROM money.materialized_billable_xact_summary
23 WHERE xact_type = 'circulation' AND xact_finish IS NULL
26 CREATE OR REPLACE VIEW money.usr_summary AS
29 sum(total_paid) AS total_paid,
30 sum(total_owed) AS total_owed,
31 sum(balance_owed) AS balance_owed
32 FROM money.materialized_billable_xact_summary
35 CREATE OR REPLACE VIEW money.open_usr_summary AS
38 sum(total_paid) AS total_paid,
39 sum(total_owed) AS total_owed,
40 sum(balance_owed) AS balance_owed
41 FROM money.materialized_billable_xact_summary
42 WHERE xact_finish IS NULL