3 INSERT INTO config.upgrade_log (version) VALUES ('0108');
5 INSERT INTO action_trigger.hook (key, core_type, description, passive)
7 'format.selfcheck.items_out',
9 'Formats items out for self-checkout receipt',
13 INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, group_field, granularity, template )
18 'Self-Checkout Items Out Receipt',
19 'format.selfcheck.items_out',
26 [%- SET user = target.0.usr -%]
27 [%- SET lib = target.0.circ_lib -%]
28 [%- SET lib_addr = target.0.circ_lib.billing_address -%]
29 [%- SET hours = lib.hours_of_operation -%]
31 <style> li { padding: 8px; margin 5px; }</style>
32 <div>[% date.format %]</div>
33 <div>[% lib.name %]</div>
34 <div>[% lib_addr.street1 %] [% lib_addr.street2 %]</div>
35 <div>[% lib_addr.city %], [% lib_addr.state %] [% lb_addr.post_code %]</div>
36 <div>[% lib.phone %]</div>
39 [% user.family_name %], [% user.first_given_name %]
41 [% FOR circ IN target %]
43 <div>[% helpers.get_copy_bib_basics(circ.target_copy.id).title %]</div>
44 <div>Barcode: [% circ.target_copy.barcode %]</div>
45 <div>Due Date: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]</div>
52 [%- BLOCK format_time; date.format(time _ ' 1/1/1000', format='%I:%M %p'); END -%]
55 [% PROCESS format_time time = hours.dow_0_open %]
56 [% PROCESS format_time time = hours.dow_0_close %]
60 [% PROCESS format_time time = hours.dow_1_open %]
61 [% PROCESS format_time time = hours.dow_1_close %]
65 [% PROCESS format_time time = hours.dow_2_open %]
66 [% PROCESS format_time time = hours.dow_2_close %]
70 [% PROCESS format_time time = hours.dow_3_open %]
71 [% PROCESS format_time time = hours.dow_3_close %]
75 [% PROCESS format_time time = hours.dow_4_open %]
76 [% PROCESS format_time time = hours.dow_4_close %]
80 [% PROCESS format_time time = hours.dow_5_open %]
81 [% PROCESS format_time time = hours.dow_5_close %]
85 [% PROCESS format_time time = hours.dow_6_open %]
86 [% PROCESS format_time time = hours.dow_6_close %]
94 INSERT INTO action_trigger.environment ( event_def, path) VALUES
96 ( 11, 'circ_lib.billing_address'),
97 ( 11, 'circ_lib.hours_of_operation'),