3 INSERT INTO config.upgrade_log (version) VALUES ('0158'); -- atz
5 INSERT INTO action_trigger.hook (key, core_type, description, passive)
9 'Formats lineitem worksheet for titles received',
13 INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, granularity, template)
18 'Titles Received Lineitem Worksheet',
25 [%- SET li = target; -%]
28 <div class="lineid">Lineitem ID: [% li.id %]</div>
29 <div class="count"><span id="countno">[% li.lineitem_details.size %]</span> items</div>
30 [% IF detail.recv_time %]<div class="dateformat">Expected: [% li.expected_recv_time %]</div>[% END %]
44 [% FOREACH detail IN li.lineitem_details %]
47 <td rowspan='[% li.lineitem_details.size %]'>
48 [%- helpers.get_li_attr("title", "", li.attributes) -%]
51 <!-- acq.lineitem_detail.id = [%- detail.id -%] -->
52 <td>[% IF detail.recv_time %]<span class="recv_time">[% detail.recv_time %]</span>[% END %]</td>
53 <td>[% IF detail.barcode %]<span class="barcode" >[% detail.barcode %]</span>[% END %]</td>
54 <td>[% IF detail.cn_label %]<span class="cn_label" >[% detail.cn_label %]</span>[% END %]</td>
56 ==> [% detail.owning_lib.shortname %] ([% detail.owning_lib.name %])
57 [% IF detail.note %]( [% detail.note %] )[% END %]
60 [%- SET notelist = [] -%]
61 [%- FOR note IN li.lineitem_notes -%]
62 [%- notelist.push(note.value) -%]
64 [%- notelist.join('<br/>') -%]
75 INSERT INTO action_trigger.environment (event_def, path) VALUES
77 ( 14, 'lineitem_details' ),
78 ( 14, 'lineitem_details.owning_lib' ),
79 ( 14, 'lineitem_notes' )