From: Galen Charlton Date: Mon, 14 Mar 2016 21:01:16 +0000 (-0400) Subject: LP#1551447: stamp database update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0942ab31455c91dfe8b6d43edf1133930309a8f3;p=evergreen%2Ftadl.git LP#1551447: stamp database update Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 36cdbc8bea..533c3060b9 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps 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, diff --git a/Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql b/Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql new file mode 100644 index 0000000000..8cad6d48ae --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql @@ -0,0 +1,65 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0973', :eg_version); -- tmccanna/gmcharlt + +UPDATE action_trigger.event_definition SET template = +$$ +[%- USE date -%] +[%- SET user = target -%] +
+ +
[% date.format %]
+
+ Fines for:
+ [% user.family_name %], [% user.first_given_name %] +
    + [% FOR xact IN user.open_billable_transactions_summary %] + [% IF xact.balance_owed > 0 %] +
  1. +
    Details: + [% IF xact.xact_type == 'circulation' %] + [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%] + [% ELSE %] + [%- xact.last_billing_type -%] + [% END %] +
    +
    Total Billed: [% xact.total_owed %]
    +
    Total Paid: [% xact.total_paid %]
    +
    Balance Owed : [% xact.balance_owed %]
    +
  2. + [% END %] + [% END %] +
+
+$$ WHERE id=13 +AND template = +$$ +[%- USE date -%] +[%- SET user = target -%] +
+ +
[% date.format %]
+
+ + [% user.family_name %], [% user.first_given_name %] +
    + [% FOR xact IN user.open_billable_transactions_summary %] +
  1. +
    Details: + [% IF xact.xact_type == 'circulation' %] + [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%] + [% ELSE %] + [%- xact.last_billing_type -%] + [% END %] +
    +
    Total Billed: [% xact.total_owed %]
    +
    Total Paid: [% xact.total_paid %]
    +
    Balance Owed : [% xact.balance_owed %]
    +
  2. + [% END %] +
+
+$$ +; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql deleted file mode 100644 index 3e6f5d7da7..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql +++ /dev/null @@ -1,65 +0,0 @@ -BEGIN; - -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -UPDATE action_trigger.event_definition SET template = -$$ -[%- USE date -%] -[%- SET user = target -%] -
- -
[% date.format %]
-
- Fines for:
- [% user.family_name %], [% user.first_given_name %] -
    - [% FOR xact IN user.open_billable_transactions_summary %] - [% IF xact.balance_owed > 0 %] -
  1. -
    Details: - [% IF xact.xact_type == 'circulation' %] - [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%] - [% ELSE %] - [%- xact.last_billing_type -%] - [% END %] -
    -
    Total Billed: [% xact.total_owed %]
    -
    Total Paid: [% xact.total_paid %]
    -
    Balance Owed : [% xact.balance_owed %]
    -
  2. - [% END %] - [% END %] -
-
-$$ WHERE id=13 -AND template = -$$ -[%- USE date -%] -[%- SET user = target -%] -
- -
[% date.format %]
-
- - [% user.family_name %], [% user.first_given_name %] -
    - [% FOR xact IN user.open_billable_transactions_summary %] -
  1. -
    Details: - [% IF xact.xact_type == 'circulation' %] - [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%] - [% ELSE %] - [%- xact.last_billing_type -%] - [% END %] -
    -
    Total Billed: [% xact.total_owed %]
    -
    Total Paid: [% xact.total_paid %]
    -
    Balance Owed : [% xact.balance_owed %]
    -
  2. - [% END %] -
-
-$$ -; - -COMMIT;