use Koha::DateUtils;
use Koha::Calendar;
use Koha::Checkouts;
+use Koha::Illrequests;
use Koha::Items;
use Koha::Patrons;
use Koha::Patron::Debarments;
DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' });
}
+ # Check if this item belongs to a biblio record that is attached to an
+ # ILL request, if it is we need to update the ILL request's status
+ if (C4::Context->preference('CirculateILL')) {
+ my $request = Koha::Illrequests->find(
+ { biblio_id => $item->biblio->biblionumber }
+ );
+ $request->status('RET') if $request;
+ }
+
# Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){
my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode';
method => 'check_out',
next_actions => [ ],
ui_method_icon => 'fa-upload',
- }
+ },
+ RET => {
+ prev_actions => [ 'CHK' ],
+ id => 'RET',
+ name => 'Returned to library',
+ ui_method_name => 'Check in',
+ method => 'check_in',
+ next_actions => [ 'COMP' ],
+ ui_method_icon => 'fa-download',
+ }
};
}