Lines 124-129
sub offline_ok {
Link Here
|
124 |
sub checkout { |
124 |
sub checkout { |
125 |
my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_; |
125 |
my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_; |
126 |
my ( $patron, $item, $circ ); |
126 |
my ( $patron, $item, $circ ); |
|
|
127 |
my @blocked_item_types; |
128 |
if (defined $account->{blocked_item_types}) { |
129 |
@blocked_item_types = split /\|/, $account->{blocked_item_types}; |
130 |
} |
127 |
$circ = C4::SIP::ILS::Transaction::Checkout->new(); |
131 |
$circ = C4::SIP::ILS::Transaction::Checkout->new(); |
128 |
# BEGIN TRANSACTION |
132 |
# BEGIN TRANSACTION |
129 |
$circ->patron( $patron = C4::SIP::ILS::Patron->new($patron_id) ); |
133 |
$circ->patron( $patron = C4::SIP::ILS::Patron->new($patron_id) ); |
Lines 161-166
sub checkout {
Link Here
|
161 |
{ |
165 |
{ |
162 |
$circ->screen_msg("Item checked out to another patron"); |
166 |
$circ->screen_msg("Item checked out to another patron"); |
163 |
} |
167 |
} |
|
|
168 |
elsif (grep { $_ eq $item->{itemtype} } @blocked_item_types) { |
169 |
$circ->screen_msg("Item type cannot be checked out at this checkout location"); |
170 |
} |
164 |
else { |
171 |
else { |
165 |
$circ->do_checkout($account, $no_block_due_date); |
172 |
$circ->do_checkout($account, $no_block_due_date); |
166 |
if ( $circ->ok ) { |
173 |
if ( $circ->ok ) { |