Lines 190-201
sub checkin {
Link Here
|
190 |
# It's ok to check it in if it exists, and if it was checked out |
190 |
# It's ok to check it in if it exists, and if it was checked out |
191 |
$circ->ok($item && $item->{patron}); |
191 |
$circ->ok($item && $item->{patron}); |
192 |
|
192 |
|
193 |
if ($circ->ok) { |
193 |
if (!defined($item->{patron})) { |
194 |
$circ->patron($patron = new ILS::Patron $item->{patron}); |
194 |
$circ->screen_msg("Item not checked out"); |
195 |
delete $item->{patron}; |
195 |
} else { |
196 |
delete $item->{due_date}; |
196 |
if ($circ->ok) { |
197 |
$patron->{items} = [ grep {$_ ne $item_id} @{$patron->{items}} ]; |
197 |
$circ->patron($patron = new ILS::Patron $item->{patron}); |
198 |
} |
198 |
delete $item->{patron}; |
|
|
199 |
delete $item->{due_date}; |
200 |
$patron->{items} = [ grep {$_ ne $item_id} @{$patron->{items}} ]; |
201 |
} |
202 |
} |
199 |
# END TRANSACTION |
203 |
# END TRANSACTION |
200 |
|
204 |
|
201 |
return $circ; |
205 |
return $circ; |
202 |
- |
|
|