3 INSERT INTO config.upgrade_log (version) VALUES ('0384');
5 INSERT INTO action_trigger.hook (key,core_type,description,passive)
7 'ahr.format.pull_list',
10 'ahr.format.pull_list',
11 'Format holds pull list for printing',
18 INSERT INTO action_trigger.event_definition (
34 'ahr.format.pull_list',
42 table { border-collapse: collapse; }
43 td { padding: 5px; border-bottom: 1px solid #888; }
44 th { font-weight: bold; }
47 # Sort the holds into copy-location buckets
48 # In the main print loop, sort each bucket by callnumber before printing
51 SET current_location = target.0.current_copy.location.id;
53 IF current_location != hold.current_copy.location.id;
54 SET current_location = hold.current_copy.location.id;
55 holds_list.push(loc_data);
60 'callnumber' => hold.current_copy.call_number.label
62 loc_data.push(hold_data);
64 holds_list.push(loc_data)
71 <th>Shelving Location</th>
78 [% FOR loc_data IN holds_list %]
79 [% FOR hold_data IN loc_data.sort('callnumber') %]
81 SET hold = hold_data.hold;
82 SET copy_data = helpers.get_copy_bib_basics(hold.current_copy.id);
85 <td>[% copy_data.title | truncate %]</td>
86 <td>[% copy_data.author | truncate %]</td>
87 <td>[% hold.current_copy.location.name %]</td>
88 <td>[% hold.current_copy.call_number.label %]</td>
89 <td>[% hold.current_copy.barcode %]</td>
90 <td>[% hold.usr.card.barcode %]</td>
99 INSERT INTO action_trigger.environment (
103 (35, 'current_copy.location'),
104 (35, 'current_copy.call_number'),
109 -- DELETE FROM config.upgrade_log WHERE version = 'tmp'; DELETE FROM action_trigger.event WHERE event_def IN (35); DELETE FROM action_trigger.environment WHERE event_def IN (35); DELETE FROM action_trigger.event_definition WHERE id IN (35); DELETE FROM action_trigger.hook WHERE key IN ( 'ahr.format.pull_list' );