The INSERT was missing the copynumber parameter. moredetail.pl was also not setting
the copyvol template variable. This patch corrects these issues so that the copynumber
is both inserted when a new item is created (including during a bulkmarcimport.pl run)
and displayed properly on moredetail.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
ccode = ?,
itype = ?,
materials = ?,
- uri = ?,
+ uri = ?,
enumchron = ?,
- more_subfields_xml = ?
+ more_subfields_xml = ?,
+ copynumber = ?
";
my $sth = $dbh->prepare($query);
$sth->execute(
$item->{'materials'},
$item->{'uri'},
$item->{'enumchron'},
- $item->{'more_subfields_xml'},
+ $item->{'more_subfields_xml'},
+ $item->{'copynumber'},
);
my $itemnumber = $dbh->{'mysql_insertid'};
if ( defined $sth->errstr ) {
$item->{'datelastseen'} = format_date($item->{'datelastseen'});
$item->{'ordernumber'} = $ordernum;
$item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
- if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) {
- $item->{status_advisory} = 1;
- }
+ $item->{'copyvol'} = $item->{'copynumber'};
+ if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) {
+ $item->{status_advisory} = 1;
+ }
if (C4::Context->preference("IndependantBranches")) {
#verifying rights