'cmd_items_mark_lost2' : [ ['command'], function() { obj.items_mark_lost(2); /*obj.retrieve();*/ } ],
'cmd_items_claimed_returned' : [ ['command'], function() { obj.items_claimed_returned(1); /*obj.retrieve();*/ } ],
'cmd_items_claimed_returned2' : [ ['command'], function() { obj.items_claimed_returned(2); /*obj.retrieve();*/ } ],
+ 'cmd_items_claimed_never_checked_out' : [
+ ['command'],
+ function() {
+ obj.items_checkin(
+ 1,{'claims_never_checked_out':true}
+ );
+ }
+ ],
+ 'cmd_items_claimed_never_checked_out2' : [
+ ['command'],
+ function() {
+ obj.items_checkin(
+ 2,{'claims_never_checked_out':true}
+ );
+ }
+ ],
'cmd_items_checkin' : [ ['command'], function() { obj.items_checkin(1); /*obj.retrieve();*/ } ],
'cmd_items_checkin2' : [ ['command'], function() { obj.items_checkin(2); /*obj.retrieve();*/ } ],
'cmd_show_catalog' : [ ['command'], function() { obj.show_catalog(1); } ],
obj.controller.view.sel_patron2.setAttribute('disabled','true');
obj.controller.view.cmd_triggered_events2.setAttribute('disabled','true');
obj.controller.view.cmd_items_claimed_returned.setAttribute('disabled','true');
+ obj.controller.view.cmd_items_claimed_never_checked_out.setAttribute('disabled','true');
obj.controller.view.cmd_items_renew.setAttribute('disabled','true');
obj.controller.view.cmd_items_renew_with_date.setAttribute('disabled','true');
obj.controller.view.cmd_items_checkin.setAttribute('disabled','true');
obj.controller.view.cmd_items_mark_lost.setAttribute('disabled','true');
obj.controller.view.cmd_show_catalog.setAttribute('disabled','true');
obj.controller.view.cmd_items_claimed_returned2.setAttribute('disabled','true');
+ obj.controller.view.cmd_items_claimed_never_checked_out2.setAttribute('disabled','true');
obj.controller.view.cmd_items_renew2.setAttribute('disabled','true');
obj.controller.view.cmd_items_renew_with_date2.setAttribute('disabled','true');
obj.controller.view.cmd_items_checkin2.setAttribute('disabled','true');
}
},
- 'items_checkin' : function(which) {
+ 'items_checkin' : function(which,options) {
var obj = this;
try {
+ if (!options) { options = {}; }
var retrieve_ids = ( which == 2 ? obj.retrieve_ids2 : obj.retrieve_ids );
if (!retrieve_ids || retrieve_ids.length == 0) return;
JSAN.use('util.functional');
var msg = '';
- if (retrieve_ids.length > 1) {
- msg += $("patronStrings").getFormattedString('staff.patron.items.items_checkin.confirm_item_check_in.plural',
- [util.functional.map_list( retrieve_ids, function(o){return o.barcode;}).join(', ')]);
+ if (options.claims_never_checked_out) {
+ if (retrieve_ids.length > 1) {
+ msg += $("patronStrings").getFormattedString(
+ 'staff.patron.items.items_checkin.confirm_item_claimed_never_checked_out.plural',
+ [
+ util.functional.map_list(
+ retrieve_ids,
+ function(o){return o.barcode;}
+ ).join(', ')
+ ]
+ );
+ } else {
+ msg += $("patronStrings").getFormattedString(
+ 'staff.patron.items.items_checkin.confirm_item_claimed_never_checked_out.singular',
+ [
+ retrieve_ids[0].barcode,
+ ]
+ );
+ }
} else {
- msg += $("patronStrings").getFormattedString('staff.patron.items.items_checkin.confirm_item_check_in.singular',
- [util.functional.map_list( retrieve_ids, function(o){return o.barcode;}).join(', ')]);
+ if (retrieve_ids.length > 1) {
+ msg += $("patronStrings").getFormattedString(
+ 'staff.patron.items.items_checkin.confirm_item_check_in.plural',
+ [
+ util.functional.map_list(
+ retrieve_ids,
+ function(o){return o.barcode;}
+ ).join(', ')
+ ]
+ );
+ } else {
+ msg += $("patronStrings").getFormattedString(
+ 'staff.patron.items.items_checkin.confirm_item_check_in.singular',
+ [
+ retrieve_ids[0].barcode,
+ ]
+ );
+ }
+
}
var r = window.confirm(msg);
if (!r) { return; }
for (var i = 0; i < retrieve_ids.length; i++) {
var copy_id = retrieve_ids[i].copy_id;
dump('Check in copy_id = ' + copy_id + ' barcode = ' + retrieve_ids[i].barcode + '\n');
+ var opt = JSON2js( js2JSON( options || {} ) ); // clone options
+ opt.copy_id = copy_id;
var robj = circ.util.checkin_via_barcode(
ses(),
- { 'copy_id' : copy_id },
+ opt,
false /* backdate */,
auto_print
);
var obj = this;
obj.controller.view.cmd_items_claimed_returned.setAttribute('disabled','false');
+ obj.controller.view.cmd_items_claimed_never_checked_out.setAttribute('disabled','false');
obj.controller.view.cmd_items_renew.setAttribute('disabled','false');
obj.controller.view.cmd_items_renew_with_date.setAttribute('disabled','false');
obj.controller.view.cmd_items_checkin.setAttribute('disabled','false');
var obj = this;
obj.controller.view.cmd_items_claimed_returned2.setAttribute('disabled','false');
+ obj.controller.view.cmd_items_claimed_never_checked_out2.setAttribute('disabled','false');
obj.controller.view.cmd_items_renew2.setAttribute('disabled','false');
obj.controller.view.cmd_items_renew_with_date2.setAttribute('disabled','false');
obj.controller.view.cmd_items_checkin2.setAttribute('disabled','false');
<command id="cmd_items_renew_all" />
<command id="cmd_items_renew_with_date" />
<command id="cmd_items_claimed_returned" />
+ <command id="cmd_items_claimed_never_checked_out" />
<command id="cmd_items_checkin" />
<command id="cmd_items_edit" />
<command id="cmd_items_mark_lost" />
<command id="cmd_items_renew2" />
<command id="cmd_items_renew_with_date2" />
<command id="cmd_items_claimed_returned2" />
+ <command id="cmd_items_claimed_never_checked_out2" />
<command id="cmd_items_checkin2" />
<command id="cmd_items_edit2" />
<command id="cmd_items_mark_lost2" />
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned" />
+ <menuitem label="&staff.patron.items_overlay.items_claimed_never_checked_out.label;" command="cmd_items_claimed_never_checked_out" />
<menuitem label="&staff.patron.items_overlay.items_renew.label;" command="cmd_items_renew" />
<menuitem label="&staff.patron.items_overlay.items_renew_all.label;" command="cmd_items_renew_all" hidden="false"/>
<menuitem label="&staff.patron.items_overlay.items_renew_with_date.label;" command="cmd_items_renew_with_date" hidden="false"/>
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit2" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost2" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned2" />
+ <menuitem label="&staff.patron.items_overlay.items_claimed_never_checked_out.label;" command="cmd_items_claimed_never_checked_out2" />
<menuitem label="&staff.patron.items_overlay.items_renew.label;" command="cmd_items_renew2" />
<menuitem label="&staff.patron.items_overlay.items_renew_with_date.label;" command="cmd_items_renew_with_date2" />
<menuitem label="&staff.patron.items_overlay.items_checkin.label;" command="cmd_items_checkin2" />
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned" />
+ <menuitem label="&staff.patron.items_overlay.items_claimed_never_checked_out.label;" command="cmd_items_claimed_never_checked_out" />
<menuitem label="&staff.patron.items_overlay.items_renew.label;" command="cmd_items_renew" />
<menuitem label="&staff.patron.items_overlay.items_renew_all.label;" command="cmd_items_renew_all" hidden="false"/>
<menuitem label="&staff.patron.items_overlay.items_renew_with_date.label;" command="cmd_items_renew_with_date" hidden="false"/>
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit2" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost2" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned2" />
+ <menuitem label="&staff.patron.items_overlay.items_claimed_never_checked_out.label;" command="cmd_items_claimed_never_checked_out2" />
<menuitem label="&staff.patron.items_overlay.items_renew.label;" command="cmd_items_renew2" />
<menuitem label="&staff.patron.items_overlay.items_renew_with_date.label;" command="cmd_items_renew_with_date2" hidden="false"/>
<menuitem label="&staff.patron.items_overlay.items_checkin.label;" command="cmd_items_checkin2" />