diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index e6ff28cf5b..0c58b07f15 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -124,6 +124,10 @@ sub offline_ok { sub checkout { my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_; my ( $patron, $item, $circ ); + my @blocked_item_types; + if (defined $account->{blocked_item_types}) { + @blocked_item_types = split /\|/, $account->{blocked_item_types}; + } $circ = C4::SIP::ILS::Transaction::Checkout->new(); # BEGIN TRANSACTION $circ->patron( $patron = C4::SIP::ILS::Patron->new($patron_id) ); @@ -161,6 +165,9 @@ sub checkout { { $circ->screen_msg("Item checked out to another patron"); } + elsif (grep { $_ eq $item->{itemtype} } @blocked_item_types) { + $circ->screen_msg("Item type cannot be checked out at this checkout location"); + } else { $circ->do_checkout($account, $no_block_due_date); if ( $circ->ok ) { diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml index d17e2ff94b..5264c2674c 100644 --- a/etc/SIPconfig.xml +++ b/etc/SIPconfig.xml @@ -78,6 +78,7 @@ format_due_date="0" inhouse_item_types="" inhouse_patron_categories="" + blocked_item_types="VM|MU" seen_on_item_information="mark_found">