BEGIN; INSERT INTO config.upgrade_log (version) VALUES ('0158'); -- atz INSERT INTO action_trigger.hook (key, core_type, description, passive) VALUES ( 'format.acqli.html', 'jub', 'Formats lineitem worksheet for titles received', TRUE ); INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, granularity, template) VALUES ( 14, TRUE, 1, 'Titles Received Lineitem Worksheet', 'format.acqli.html', 'NOOP_True', 'ProcessTemplate', 'print-on-demand', $$ [%- USE date -%] [%- SET li = target; -%]
Lineitem ID: [% li.id %]
[% li.lineitem_details.size %] items
[% IF detail.recv_time %]
Expected: [% li.expected_recv_time %]
[% END %]
[% FOREACH detail IN li.lineitem_details %] [% IF loop.first %] [% END %] [% END %]
Title Recd. Barcode Call Number Distribution Notes
[%- helpers.get_li_attr("title", "", li.attributes) -%] [% IF detail.recv_time %][% detail.recv_time %][% END %] [% IF detail.barcode %][% detail.barcode %][% END %] [% IF detail.cn_label %][% detail.cn_label %][% END %] ==> [% detail.owning_lib.shortname %] ([% detail.owning_lib.name %]) [% IF detail.note %]( [% detail.note %] )[% END %] [%- SET notelist = [] -%] [%- FOR note IN li.lineitem_notes -%] [%- notelist.push(note.value) -%] [%- END -%] [%- notelist.join('
') -%]
$$ ); INSERT INTO action_trigger.environment (event_def, path) VALUES ( 14, 'attributes' ), ( 14, 'lineitem_details' ), ( 14, 'lineitem_details.owning_lib' ), ( 14, 'lineitem_notes' ) ; COMMIT;