}
}
- if ( C4::Context->preference("ReturnToShelvingCart") ) {
- my $item = GetItem( $itemnumber );
- $item->{'location'} = 'CART';
- ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
- }
-
#
# save the return
#
);
if ($returned) {
- my $time_now = DateTime->now( time_zone => C4::Context->tz )->truncate( to => 'minutes');
+ my $time_now = DateTime->now( time_zone => C4::Context->tz )->truncate( to => 'minute');
my $duedate = $issueinformation->{date_due}->strftime('%Y-%m-%d %H:%M');
$returneditems{0} = $barcode;
$riborrowernumber{0} = $borrower->{'borrowernumber'};
$input{duedate} = 0;
$returneditems{0} = $barcode;
$riduedate{0} = 0;
- if ( $messages->{'wthdrawn'} ) {
- $input{withdrawn} = 1;
- $input{borrowernumber} = 'Item Cancelled'; # FIXME: should be in display layer ?
- $riborrowernumber{0} = 'Item Cancelled';
- }
- else {
- $input{borrowernumber} = ' '; # This seems clearly bogus.
- $riborrowernumber{0} = ' ';
- }
push( @inputloop, \%input );
}
}
}
elsif ( $code eq 'wthdrawn' ) {
$err{withdrawn} = 1;
- $exit_required_p = 1;
+ $exit_required_p = 1 if C4::Context->preference("BlockReturnOfWithdrawnItems");
}
elsif ( ( $code eq 'IsPermanent' ) && ( not $messages->{'ResFound'} ) ) {
if ( $messages->{'IsPermanent'} ne $userenv_branch ) {
# my %ri;
my $biblio = GetBiblioFromItemNumber(GetItemnumberFromBarcode($bar_code));
+ my $item = GetItem( GetItemnumberFromBarcode($bar_code) );
# fix up item type for display
$biblio->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $biblio->{'itype'} : $biblio->{'itemtype'};
$ri{itembiblionumber} = $biblio->{'biblionumber'};
$ri{ccode} = $biblio->{'ccode'};
$ri{itemnumber} = $biblio->{'itemnumber'};
$ri{barcode} = $bar_code;
+ $ri{homebranch} = $item->{'homebranch'};
+ $ri{holdingbranch} = $item->{'holdingbranch'};
$ri{location} = $biblio->{'location'};
my $shelfcode = $ri{'location'};
dropboxdate => output_pref($dropboxdate),
overduecharges => $overduecharges,
soundon => C4::Context->preference("SoundOn"),
+ BlockReturnOfWithdrawnItems => C4::Context->preference("BlockReturnOfWithdrawnItems"),
);
### Comment out rotating collections for now to allow it a little more time to bake