use strict;
+use Carp;
use C4::Context;
use C4::Koha;
use C4::Biblio;
GetItemsInfo
get_itemnumbers_of
GetItemnumberFromBarcode
+
+ CartToShelf
);
}
return $data;
} # sub GetItem
+=head2 CartToShelf
+
+=over 4
+
+CartToShelf($itemnumber);
+
+=back
+
+Set the current shelving location of the item record
+to its stored permanent shelving location. This is
+primarily used to indicate when an item whose current
+location is a special processing ('PROC') or shelving cart
+('CART') location is back in the stacks.
+
+=cut
+
+sub CartToShelf {
+ my ( $itemnumber ) = @_;
+
+ unless ( $itemnumber ) {
+ croak "FAILED CartToShelf() - no itemnumber supplied";
+ }
+
+ my $item = GetItem($itemnumber);
+ $item->{location} = $item->{permanent_location};
+ ModItem($item, undef, $itemnumber);
+}
+
=head2 AddItemFromMarc
=over 4
authorised values for a biblio.
parameters: listref of authorised values, such as comes from
- get_item_ahtorised_values or
+ get_item_authorised_values or
from C4::Biblio::get_biblio_authorised_values
returns: listref of hashrefs for each image. Each hashref looks like
(not defined $item->{'wthdrawn'} or $item->{'wthdrawn'} eq '')) {
$item->{'wthdrawn'} = 0;
}
+ if (exists $item->{'location'} && !exists $item->{'permanent_location'}) {
+ $item->{'permanent_location'} = $item->{'location'};
+ }
}
=head2 _get_single_item_column