1 --Upgrade Script for 2.8.6 to 2.8.7
2 \set eg_version '''2.8.7'''
4 INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.8.7', :eg_version);
6 SELECT evergreen.upgrade_deps_block_check('0959', :eg_version);
8 CREATE OR REPLACE VIEW money.transaction_billing_summary AS
14 FROM money.materialized_billable_xact_summary;
17 SELECT evergreen.upgrade_deps_block_check('0972', :eg_version); -- jstompro/gmcharlt
19 -- LP#1550495 - Add Baker&Taylor EDI Quantity Cancel Code
20 -- Insert EDI Cancel Reason 85 (1200 + 85 = 1285) if it doesn't already exist
21 INSERT INTO acq.cancel_reason
22 (org_unit, keep_debits, id, label, description)
25 oils_i18n_gettext(1285, 'Canceled: By Vendor', 'acqcr', 'label'),
26 oils_i18n_gettext(1285, 'Line item canceled by vendor', 'acqcr', 'description')
28 SELECT 1 FROM acq.cancel_reason where id=(85+1200)
33 SELECT evergreen.upgrade_deps_block_check('0973', :eg_version); -- tmccanna/gmcharlt
35 UPDATE action_trigger.event_definition SET template =
38 [%- SET user = target -%]
40 <style> li { padding: 8px; margin 5px; }</style>
41 <div>[% date.format %]</div>
44 [% user.family_name %], [% user.first_given_name %]
46 [% FOR xact IN user.open_billable_transactions_summary %]
47 [% IF xact.balance_owed > 0 %]
50 [% IF xact.xact_type == 'circulation' %]
51 [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
53 [%- xact.last_billing_type -%]
56 <div>Total Billed: [% xact.total_owed %]</div>
57 <div>Total Paid: [% xact.total_paid %]</div>
58 <div>Balance Owed : [% xact.balance_owed %]</div>
68 [%- SET user = target -%]
70 <style> li { padding: 8px; margin 5px; }</style>
71 <div>[% date.format %]</div>
74 [% user.family_name %], [% user.first_given_name %]
76 [% FOR xact IN user.open_billable_transactions_summary %]
79 [% IF xact.xact_type == 'circulation' %]
80 [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
82 [%- xact.last_billing_type -%]
85 <div>Total Billed: [% xact.total_owed %]</div>
86 <div>Total Paid: [% xact.total_paid %]</div>
87 <div>Balance Owed : [% xact.balance_owed %]</div>
96 SELECT evergreen.upgrade_deps_block_check('0974', :eg_version); -- tmccanna/gmcharlt
98 UPDATE action_trigger.event_definition SET template =
101 [%- SET user = target.0.usr -%]
103 <style> li { padding: 8px; margin 5px; }</style>
104 <div>[% date.format %]</div>
107 [% user.family_name %], [% user.first_given_name %]
110 [% FOR hold IN target %]
112 SET idx = loop.count - 1;
113 SET udata = user_data.$idx;
116 <div>Title: [% udata.item_title %]</div>
117 <div>Author: [% udata.item_author %]</div>
118 <div>Pickup Location: [% udata.pickup_lib %]</b></div>
120 [%- IF udata.ready -%]
123 #[% udata.queue_position %] of
124 [% udata.potential_copies %] copies.
136 [%- SET user = target.0.usr -%]
138 <style> li { padding: 8px; margin 5px; }</style>
139 <div>[% date.format %]</div>
142 [% user.family_name %], [% user.first_given_name %]
144 [% FOR hold IN target %]
146 SET idx = loop.count - 1;
147 SET udata = user_data.$idx
150 <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
151 <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
152 <div>Pickup Location: [% hold.pickup_lib.name %]</div>
154 [%- IF udata.ready -%]
157 #[% udata.queue_position %] of [% udata.potential_copies %] copies.