From: Bill Erickson Date: Thu, 30 Jun 2022 15:34:39 +0000 (-0400) Subject: LP1840773 SCKO Angular X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=01f089d3ce15005c20b40184e89b0ca97ae112a9;p=working%2FEvergreen.git LP1840773 SCKO Angular Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 9d22cd1cb7..f18ff8e473 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -22192,3 +22192,226 @@ VALUES ( ) ); +INSERT INTO config.print_template + (name, label, owner, active, locale, content_type, template) +VALUES ('scko_items_out', 'Self-Checkout Items Out', 1, TRUE, 'en-US', 'text/html', ''); + +UPDATE config.print_template SET template = $TEMPLATE$ +[%- + USE date; + SET user = template_data.user; + SET checkouts = template_data.checkouts; +-%] +
+ +
[% date.format(date.now, '%x %r') %]
+
+ + [% user.pref_family_name || user.family_name %], + [% user.pref_first_given_name || user.first_given_name %] + +
    + [% FOR checkout IN checkouts %] +
  1. +
    [% checkout.title %]
    +
    Barcode: [% checkout.copy.barcode %]
    +
    Due Date: [% + date.format(helpers.format_date( + checkout.circ.due_date, staff_org_timezone), '%x %r') + %] +
    +
  2. + [% END %] +
+
+$TEMPLATE$ WHERE name = 'scko_items_out'; + +INSERT INTO config.print_template + (name, label, owner, active, locale, content_type, template) +VALUES ('scko_holds', 'Self-Checkout Holds', 1, TRUE, 'en-US', 'text/html', ''); + +UPDATE config.print_template SET template = $TEMPLATE$ +[%- + USE date; + SET user = template_data.user; + SET holds = template_data.holds; +-%] +
+ +
[% date.format(date.now, '%x %r') %]
+
+ + [% user.pref_family_name || user.family_name %], + [% user.pref_first_given_name || user.first_given_name %] + +
    + [% FOR hold IN holds %] +
  1. + + + + + + + + + + + + + + + + + +
    Title:[% hold.title %]
    Author:[% hold.author %]
    Pickup Location:[% helpers.get_org_unit(hold.pickup_lib).name %]
    Status: + [%- IF hold.ready -%] + Ready for pickup + [% ELSE %] + #[% hold.relative_queue_position %] of [% hold.potentials %] copies. + [% END %] +
    +
  2. + [% END %] +
+
+$TEMPLATE$ WHERE name = 'scko_holds'; + +INSERT INTO config.print_template + (name, label, owner, active, locale, content_type, template) +VALUES ('scko_fines', 'Self-Checkout Fines', 1, TRUE, 'en-US', 'text/html', ''); + +UPDATE config.print_template SET template = $TEMPLATE$ +[%- + USE date; + USE money = format('$%.2f'); + SET user = template_data.user; + SET xacts = template_data.xacts; +-%] +
+ +
[% date.format(date.now, '%x %r') %]
+
+ + [% user.pref_family_name || user.family_name %], + [% user.pref_first_given_name || user.first_given_name %] + +
    + [% FOR xact IN xacts %] + [% NEXT IF xact.balance_owed <= 0 %] +
  1. + + + + + + + + + + + + + + + + + +
    Details:[% xact.details %]
    Total Billed:[% money(xact.total_owed) %]
    Total Paid:[% money(xact.total_paid) %]
    Balance Owed:[% money(xact.balance_owed) %]
    +
  2. + [% END %] +
+
+$TEMPLATE$ WHERE name = 'scko_fines'; + +INSERT INTO config.print_template + (name, label, owner, active, locale, content_type, template) +VALUES ('scko_checkouts', 'Self-Checkout Checkouts', 1, TRUE, 'en-US', 'text/html', ''); + +UPDATE config.print_template SET template = $TEMPLATE$ +[%- + USE date; + SET user = template_data.user; + SET checkouts = template_data.checkouts; + SET lib = staff_org; + SET hours = lib.hours_of_operation; + SET lib_addr = staff_org.billing_address || staff_org.mailing_address; +-%] +
+ +
[% date.format(date.now, '%x %r') %]
+
[% lib.name %]
+
[% lib_addr.street1 %] [% lib_addr.street2 %]
+
[% lib_addr.city %], [% lib_addr.state %] [% lib_addr.post_code %]
+
[% lib.phone %]
+
+ + [% user.pref_family_name || user.family_name %], + [% user.pref_first_given_name || user.first_given_name %] + +
    + [% FOR checkout IN checkouts %] +
  1. +
    [% checkout.title %]
    +
    Barcode: [% checkout.barcode %]
    + + [% IF checkout.ctx.renewalFailure %] +
    Renewal Failed
    + [% END %] + +
    Due Date: [% date.format(helpers.format_date( + checkout.circ.due_date, staff_org_timezone), '%x') %]
    +
  2. + [% END %] +
+ +
+ Library Hours + [%- + BLOCK format_time; + date.format(time _ ' 1/1/1000', format='%I:%M %p'); + END + -%] +
+ Monday + [% PROCESS format_time time = hours.dow_0_open %] + [% PROCESS format_time time = hours.dow_0_close %] +
+
+ Tuesday + [% PROCESS format_time time = hours.dow_1_open %] + [% PROCESS format_time time = hours.dow_1_close %] +
+
+ Wednesday + [% PROCESS format_time time = hours.dow_2_open %] + [% PROCESS format_time time = hours.dow_2_close %] +
+
+ Thursday + [% PROCESS format_time time = hours.dow_3_open %] + [% PROCESS format_time time = hours.dow_3_close %] +
+
+ Friday + [% PROCESS format_time time = hours.dow_4_open %] + [% PROCESS format_time time = hours.dow_4_close %] +
+
+ Saturday + [% PROCESS format_time time = hours.dow_5_open %] + [% PROCESS format_time time = hours.dow_5_close %] +
+
+ Sunday + [% PROCESS format_time time = hours.dow_6_open %] + [% PROCESS format_time time = hours.dow_6_close %] +
+
+ +
+$TEMPLATE$ WHERE name = 'scko_checkouts'; + + + +