3 SELECT evergreen.upgrade_deps_block_check('0996', :eg_version);
5 INSERT INTO config.usr_setting_type (
12 'circ.send_email_checkout_receipts',
14 oils_i18n_gettext('circ.send_email_checkout_receipts', 'Email checkout receipts by default?', 'cust', 'label'),
15 oils_i18n_gettext('circ.send_email_checkout_receipts', 'Email checkout receipts by default?', 'cust', 'description'),
19 INSERT INTO action_trigger.hook (key, core_type, description, passive)
21 'circ.checkout.batch_notify',
24 'circ.checkout.batch_notify',
25 'Notification of a group of circs',
32 INSERT INTO action_trigger.hook (key, core_type, description, passive)
34 'circ.checkout.batch_notify.session',
37 'circ.checkout.batch_notify.session',
38 'Notification of a group of circs at the end of a checkout session',
45 INSERT INTO action_trigger.event_definition (
59 'Email Checkout Receipt',
60 'circ.checkout.batch_notify.session',
64 'circ.send_email_checkout_receipts',
67 [%- user = target.0.usr -%]
68 To: [%- params.recipient_email || user.email %]
69 From: [%- helpers.get_org_setting(target.0.circ_lib.id, 'org.bounced_emails') || params.sender_email || default_sender %]
70 Subject: Checkout Receipt
71 Auto-Submitted: auto-generated
73 You checked out the following items:
75 [% FOR circ IN target %]
76 [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
77 Title: [% copy_details.title %]
78 Author: [% copy_details.author %]
79 Call Number: [% circ.target_copy.call_number.label %]
80 Barcode: [% circ.target_copy.barcode %]
81 Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
82 Library: [% circ.circ_lib.name %]
87 INSERT INTO action_trigger.environment (
91 currval('action_trigger.event_definition_id_seq'),
92 'target_copy.call_number'
94 currval('action_trigger.event_definition_id_seq'),
95 'target_copy.location'
97 currval('action_trigger.event_definition_id_seq'),
100 currval('action_trigger.event_definition_id_seq'),