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
$sth->execute($biblionumber);
my $i = 0;
my @results;
- my ( $date_due, $count_reserves, $serial );
+ my $serial;
my $isth = $dbh->prepare(
"SELECT issues.*,borrowers.cardnumber,borrowers.surname,borrowers.firstname,borrowers.branchcode as bcode
my $ssth = $dbh->prepare("SELECT serialseq,publisheddate from serialitems left join serial on serialitems.serialid=serial.serialid where serialitems.itemnumber=? ");
while ( my $data = $sth->fetchrow_hashref ) {
my $datedue = '';
+ my $count_reserves;
$isth->execute( $data->{'itemnumber'} );
if ( my $idata = $isth->fetchrow_hashref ) {
$data->{borrowernumber} = $idata->{borrowernumber};
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