var patronFines = environment.patronFines;
var isRenewal = environment.isRenewal;
var isPrecat = environment.isPrecat;
+var currentLocation = environment.location;
but it should at least require an override */
-if( getMARCItemType() == 'g'
- && copy.circ_lib.id != patron.home_ou.id )
+if( getMARCItemType() == 'g' && copy.circ_lib.id != currentLocation.id )
result.events.push('CIRC_EXCEEDS_COPY_RANGE');
if( isTrue(patron.barred) )
result.events.push('PATRON_BARRED');
-if( copy.circ_modifier == 'bestsellernh' )
- result.events.push('ITEM_NOT_HOLDABLE');
-
/* projected medium
this needs to be expanded to check circ_modifiers as well
*/
-if( getMARCItemType() == 'g' &&
+var mod = (copy.circ_modifier) ? copy.circ_modifier.toLowerCase() : "";
+
+
+if( mod == 'bestsellernh' )
+ result.events.push('ITEM_NOT_HOLDABLE');
+
+if( ( getMARCItemType() == 'g' ||
+ mod == 'audiobook' ||
+ mod == 'av' ||
+ mod == 'cd' ||
+ mod == 'dvd' ||
+ mod == 'video' ) &&
+
!isOrgDescendent(copy.circ_lib.shortname, patron.home_ou.id) )
- result.events.push('CIRC_EXCEEDS_COPY_RANGE');
+
+ result.events.push('ITEM_NOT_HOLDABLE');
} go();
$runner->insert( "$evt.volume", $ctx->{volume}, 1);
$runner->insert( "$evt.title", $ctx->{title}, 1);
$runner->insert( "$evt.requestor", $ctx->{requestor}, 1);
+ $runner->insert( "$evt.location",
+ $editor->retrieve_actor_org_unit($ctx->{requestor}->ws_ou), 1);
$runner->insert( "$evt.patronItemsOut", $ctx->{patronItemsOut}, 1 );
$runner->insert( "$evt.patronOverdueCount", $ctx->{patronOverdue}, 1 );