BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0972', :eg_version); -- jstompro/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0973', :eg_version); -- tmccanna/gmcharlt
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0973', :eg_version); -- tmccanna/gmcharlt
+
+UPDATE action_trigger.event_definition SET template =
+$$
+[%- USE date -%]
+[%- SET user = target -%]
+<div>
+ <style> li { padding: 8px; margin 5px; }</style>
+ <div>[% date.format %]</div>
+ <br/>
+ Fines for:<br/>
+ [% user.family_name %], [% user.first_given_name %]
+ <ol>
+ [% FOR xact IN user.open_billable_transactions_summary %]
+ [% IF xact.balance_owed > 0 %]
+ <li>
+ <div>Details:
+ [% IF xact.xact_type == 'circulation' %]
+ [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
+ [% ELSE %]
+ [%- xact.last_billing_type -%]
+ [% END %]
+ </div>
+ <div>Total Billed: [% xact.total_owed %]</div>
+ <div>Total Paid: [% xact.total_paid %]</div>
+ <div>Balance Owed : [% xact.balance_owed %]</div>
+ </li>
+ [% END %]
+ [% END %]
+ </ol>
+</div>
+$$ WHERE id=13
+AND template =
+$$
+[%- USE date -%]
+[%- SET user = target -%]
+<div>
+ <style> li { padding: 8px; margin 5px; }</style>
+ <div>[% date.format %]</div>
+ <br/>
+
+ [% user.family_name %], [% user.first_given_name %]
+ <ol>
+ [% FOR xact IN user.open_billable_transactions_summary %]
+ <li>
+ <div>Details:
+ [% IF xact.xact_type == 'circulation' %]
+ [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
+ [% ELSE %]
+ [%- xact.last_billing_type -%]
+ [% END %]
+ </div>
+ <div>Total Billed: [% xact.total_owed %]</div>
+ <div>Total Paid: [% xact.total_paid %]</div>
+ <div>Balance Owed : [% xact.balance_owed %]</div>
+ </li>
+ [% END %]
+ </ol>
+</div>
+$$
+;
+
+COMMIT;
+++ /dev/null
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-UPDATE action_trigger.event_definition SET template =
-$$
-[%- USE date -%]
-[%- SET user = target -%]
-<div>
- <style> li { padding: 8px; margin 5px; }</style>
- <div>[% date.format %]</div>
- <br/>
- Fines for:<br/>
- [% user.family_name %], [% user.first_given_name %]
- <ol>
- [% FOR xact IN user.open_billable_transactions_summary %]
- [% IF xact.balance_owed > 0 %]
- <li>
- <div>Details:
- [% IF xact.xact_type == 'circulation' %]
- [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
- [% ELSE %]
- [%- xact.last_billing_type -%]
- [% END %]
- </div>
- <div>Total Billed: [% xact.total_owed %]</div>
- <div>Total Paid: [% xact.total_paid %]</div>
- <div>Balance Owed : [% xact.balance_owed %]</div>
- </li>
- [% END %]
- [% END %]
- </ol>
-</div>
-$$ WHERE id=13
-AND template =
-$$
-[%- USE date -%]
-[%- SET user = target -%]
-<div>
- <style> li { padding: 8px; margin 5px; }</style>
- <div>[% date.format %]</div>
- <br/>
-
- [% user.family_name %], [% user.first_given_name %]
- <ol>
- [% FOR xact IN user.open_billable_transactions_summary %]
- <li>
- <div>Details:
- [% IF xact.xact_type == 'circulation' %]
- [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
- [% ELSE %]
- [%- xact.last_billing_type -%]
- [% END %]
- </div>
- <div>Total Billed: [% xact.total_owed %]</div>
- <div>Total Paid: [% xact.total_paid %]</div>
- <div>Balance Owed : [% xact.balance_owed %]</div>
- </li>
- [% END %]
- </ol>
-</div>
-$$
-;
-
-COMMIT;