From: Galen Charlton Date: Thu, 18 Jun 2020 20:27:19 +0000 (-0400) Subject: LP#1851306: stamp DB update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=be3de646ad7c8b7ef34c0bcad169d2912ccb4c50;p=evergreen%2Fpines.git LP#1851306: stamp DB 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 a7c976a3eb..1a2298710c 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -92,7 +92,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 ('1204', :eg_version); -- jeffdavis/sandbergja/csharp +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1205', :eg_version); -- sandbergja/tmcanna/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1205.data.port_capture_reservations_to_angular.sql b/Open-ILS/src/sql/Pg/upgrade/1205.data.port_capture_reservations_to_angular.sql new file mode 100644 index 0000000000..a1f872079b --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1205.data.port_capture_reservations_to_angular.sql @@ -0,0 +1,54 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1205', :eg_version); + +INSERT INTO config.print_template + (id, name, locale, active, owner, label, template) +VALUES ( + 3, 'booking_capture', 'en-US', TRUE, + (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL), + oils_i18n_gettext(3, 'Booking capture slip', 'cpt', 'label'), +$TEMPLATE$ +[%- + USE date; + SET data = template_data; + # template_data is data returned from open-ils.booking.resources.capture_for_reservation. +-%] +
+ [% IF data.transit; + dest_ou = helpers.get_org_unit(data.transit.dest); + %] +
This item need to be routed to [% dest_ou.shortname %]
+ [% ELSE %] +
This item need to be routed to RESERVATION SHELF:
+ [% END %] +
Barcode: [% data.reservation.current_resource.barcode %]
+
Title: [% data.reservation.current_resource.type.name %]
+
Note: [% data.reservation.note %]
+
+

Reserved for patron [% data.reservation.usr.family_name %], [% data.reservation.usr.first_given_name %] [% data.reservation.usr.second_given_name %] +
Barcode: [% data.reservation.usr.card.barcode %]

+

Request time: [% date.format(helpers.format_date(data.reservation.request_time, client_timezone), '%x %r', locale) %] +
Reserved from: + [% date.format(helpers.format_date(data.reservation.start_time, client_timezone), '%x %r', locale) %] + - [% date.format(helpers.format_date(data.reservation.end_time, client_timezone), '%x %r', locale) %]

+

Slip date: [% date.format(helpers.current_date(client_timezone), '%x %r', locale) %]
+ Printed by [% data.staff.family_name %], [% data.staff.first_given_name %] [% data.staff.second_given_name %] + at [% data.workstation %]

+
+
+ +$TEMPLATE$ +); + +INSERT INTO config.workstation_setting_type (name, grp, datatype, label) +VALUES ( + 'eg.grid.booking.captured', 'gui', 'object', + oils_i18n_gettext( + 'booking.manage', + 'Grid Config: Booking Captured Reservations', + 'cwst', 'label') +); + + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.port_capture_reservations_to_angular.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.port_capture_reservations_to_angular.sql deleted file mode 100644 index 75293dd28f..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.port_capture_reservations_to_angular.sql +++ /dev/null @@ -1,54 +0,0 @@ -BEGIN; - -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -INSERT INTO config.print_template - (id, name, locale, active, owner, label, template) -VALUES ( - 3, 'booking_capture', 'en-US', TRUE, - (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL), - oils_i18n_gettext(3, 'Booking capture slip', 'cpt', 'label'), -$TEMPLATE$ -[%- - USE date; - SET data = template_data; - # template_data is data returned from open-ils.booking.resources.capture_for_reservation. --%] -
- [% IF data.transit; - dest_ou = helpers.get_org_unit(data.transit.dest); - %] -
This item need to be routed to [% dest_ou.shortname %]
- [% ELSE %] -
This item need to be routed to RESERVATION SHELF:
- [% END %] -
Barcode: [% data.reservation.current_resource.barcode %]
-
Title: [% data.reservation.current_resource.type.name %]
-
Note: [% data.reservation.note %]
-
-

Reserved for patron [% data.reservation.usr.family_name %], [% data.reservation.usr.first_given_name %] [% data.reservation.usr.second_given_name %] -
Barcode: [% data.reservation.usr.card.barcode %]

-

Request time: [% date.format(helpers.format_date(data.reservation.request_time, client_timezone), '%x %r', locale) %] -
Reserved from: - [% date.format(helpers.format_date(data.reservation.start_time, client_timezone), '%x %r', locale) %] - - [% date.format(helpers.format_date(data.reservation.end_time, client_timezone), '%x %r', locale) %]

-

Slip date: [% date.format(helpers.current_date(client_timezone), '%x %r', locale) %]
- Printed by [% data.staff.family_name %], [% data.staff.first_given_name %] [% data.staff.second_given_name %] - at [% data.workstation %]

-
-
- -$TEMPLATE$ -); - -INSERT INTO config.workstation_setting_type (name, grp, datatype, label) -VALUES ( - 'eg.grid.booking.captured', 'gui', 'object', - oils_i18n_gettext( - 'booking.manage', - 'Grid Config: Booking Captured Reservations', - 'cwst', 'label') -); - - -COMMIT;