},
'hold_slip' : {
'type' : 'holds',
- 'header' : 'This item needs to be routed to <b>%route_to%</b>:<br/>\r\n',
- 'line_item' : 'Barcode: %item_barcode%<br/>\r\nTitle: %item_title%<br/>\r\n<br/>\r\n%hold_for_msg%<br/>\r\nBarcode: %PATRON_BARCODE%<br/>\r\nNotify by phone: %notify_by_phone%<br/>\r\nNotify by email: %notify_by_email%<br/>\r\n<br/>\r\nRequest date: <br/>\r\n',
- 'footer' : 'Slip Date: %TODAY_TRIM%<br/>\r\nPrinted by %STAFF_FIRSTNAME% at %SHORTNAME%<br/>\r\n<br/>\r\n'
+ 'header' : 'This item needs to be routed to <b>%route_to%</b>:<br/>\r\nBarcode: %item_barcode%<br/>\r\nTitle: %item_title%<br/>\r\n<br/>\r\n%hold_for_msg%<br/>\r\nBarcode: %PATRON_BARCODE%<br/>\r\nNotify by phone: %notify_by_phone%<br/>\r\nNotify by email: %notify_by_email%<br/>\r\n',
+ 'line_item' : '%formatted_note%<br/>\r\n',
+ 'footer' : '<br/>\r\nRequest date: %request_date%<br/>\r\nSlip Date: %TODAY_TRIM%<br/>\r\nPrinted by %STAFF_FIRSTNAME% at %SHORTNAME%<br/>\r\n<br/>\r\n'
},
'transit_slip' : {
'type' : 'transits',
},
'hold_transit_slip' : {
'type' : 'transits',
- 'header' : 'This item needs to be routed to <b>%route_to%</b>:<br/>\r\n%route_to_org_fullname%<br/>\r\n%street1%<br/>\r\n%street2%<br/>\r\n%city_state_zip%<br/>\r\n<br/>\r\n',
- 'line_item' : 'Barcode: %item_barcode%<br/>\r\nTitle: %item_title%<br/>\r\nAuthor: %item_author%<br>\r\n<br/>\r\n%hold_for_msg%<br/>\r\nBarcode: %PATRON_BARCODE%<br/>\r\nNotify by phone: %notify_by_phone%<br/>\r\nNotify by email: %notify_by_email%<br/>\r\n<br/>\r\nRequest date: <br/>\r\n',
- 'footer' : 'Slip Date: %TODAY_TRIM%<br/>\r\nPrinted by %STAFF_FIRSTNAME% at %SHORTNAME%<br/>\r\n<br/>\r\n'
+ 'header' : 'This item needs to be routed to <b>%route_to%</b>:<br/>\r\n%route_to_org_fullname%<br/>\r\n%street1%<br/>\r\n%street2%<br/>\r\n%city_state_zip%<br/>\r\n<br/>\r\nBarcode: %item_barcode%<br/>\r\nTitle: %item_title%<br/>\r\nAuthor: %item_author%<br>\r\n<br/>\r\n%hold_for_msg%<br/>\r\nBarcode: %PATRON_BARCODE%<br/>\r\nNotify by phone: %notify_by_phone%<br/>\r\nNotify by email: %notify_by_email%<br/>\r\n',
+ 'line_item' : '%formatted_note%<br/>\r\n',
+ 'footer' : '<br/>\r\nRequest date: %request_date%<br/>\r\nSlip Date: %TODAY_TRIM%<br/>\r\nPrinted by %STAFF_FIRSTNAME% at %SHORTNAME%<br/>\r\n<br/>\r\n'
}
};
}
var msg = '';
+ var print_list = [];
var print_data = {
'error' : '',
'error_msg' : '',
msg += '\n';
}
msg += '\n';
+ var notes = check.payload.hold.notes();
+ print_data.notes_raw = notes;
+ for (var i = 0; i < notes.length; i++) {
+ if ( get_bool( notes[i].slip() ) ) {
+ var temp_msg;
+ if ( get_bool( notes[i].staff() ) ) {
+ temp_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.notes.staff_note', [ notes[i].title(), notes[i].body() ]);
+ } else {
+ temp_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.notes.patron_note', [ notes[i].title(), notes[i].body() ]);
+ }
+ msg += temp_msg + '\n';
+ print_list.push(
+ {
+ 'formatted_note' : temp_msg,
+ 'note_title' : notes[i].title(),
+ 'note_body' : notes[i].body(),
+ 'note_public' : notes[i].pub(),
+ 'note_by_staff' : notes[i].staff()
+ }
+ );
+ }
+ }
+ msg += '\n';
+ msg += '\n';
print_data.request_date = util.date.formatted_date(check.payload.hold.request_time(),'%F');
print_data.request_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.request_date', [print_data.request_date]);
msg += print_data.request_date_msg;
'line_item' : data.print_list_templates[ template ].line_item,
'footer' : data.print_list_templates[ template ].footer,
'type' : data.print_list_templates[ template ].type,
- 'list' : [ {} ],
+ 'list' : print_list,
'data' : print_data
};
print.tree_list( params );
msg += '\n';
}
msg += '\n';
+ var notes = check.payload.hold.notes();
+ print_data.notes_raw = notes;
+ for (var i = 0; i < notes.length; i++) {
+ if ( get_bool( notes[i].slip() ) ) {
+ var temp_msg;
+ if ( get_bool( notes[i].staff() ) ) {
+ temp_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.notes.staff_note', [ notes[i].title(), notes[i].body() ]);
+ } else {
+ temp_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.notes.patron_note', [ notes[i].title(), notes[i].body() ]);
+ }
+ msg += temp_msg + '\n';
+ print_list.push(
+ {
+ 'formatted_note' : temp_msg,
+ 'note_title' : notes[i].title(),
+ 'note_body' : notes[i].body(),
+ 'note_public' : notes[i].pub(),
+ 'note_by_staff' : notes[i].staff()
+ }
+ );
+ }
+ }
+ msg += '\n';
+ msg += '\n';
print_data.request_date = util.date.formatted_date(check.payload.hold.request_time(),'%F');
print_data.request_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.request_date', [print_data.request_date]);
msg += print_data.request_date_msg;
'line_item' : data.print_list_templates[ template ].line_item,
'footer' : data.print_list_templates[ template ].footer,
'type' : data.print_list_templates[ template ].type,
- 'list' : [ {} ],
+ 'list' : print_list,
'data' : print_data
};
print.tree_list( params );