Browse Source

make sure when books arent marked as ref they are marked as being loanable

master
chris 22 years ago
parent
commit
de5e1cb5e5
  1. 4
      C4/Acquisitions.pm
  2. 19
      updatebibitem.pl
  3. 2
      updateitem.pl

4
C4/Acquisitions.pm

@ -629,13 +629,13 @@ sub makeitems {
}
sub moditem {
my ($itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn)=@_;
my ($loan,$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn)=@_;
my $dbh=C4Connect;
my $query="update items set biblioitemnumber=$bibitemnum,
barcode='$barcode',itemnotes='$notes'
where itemnumber=$itemnum";
if ($barcode eq ''){
$query="update items set biblioitemnumber=$bibitemnum where itemnumber=$itemnum";
$query="update items set biblioitemnumber=$bibitemnum,notforloan=$loan where itemnumber=$itemnum";
}
if ($lost ne ''){
$query="update items set biblioitemnumber=$bibitemnum,

19
updatebibitem.pl

@ -79,17 +79,34 @@ if ($existing eq 'YES'){
$flag2="leastone";
}
}
my $loan;
if ($flag eq 'notall' && $flag2 eq 'leastone'){
$bibitemnum=newbiblioitem($bibnum,$itemtype,$volumeddesc,$classification);
modbibitem($bibitemnum,$itemtype,$isbn,$publishercode,$publicationdate,$classification,$dewey,$subclass,$illus,$pages,$volumeddesc,$notes,$size);
if ($itemtype =~ /REF/){
$loan=1;
} else {
$loan=0;
}
for (my $i=0;$i<$count;$i++){
if ($barcodes[$i] ne ''){
moditem($items[$i]->{'itemnumber'},$bibitemnum);
moditem($loan,$items[$i]->{'itemnumber'},$bibitemnum);
}
}
} elsif ($flag2 eq 'leastone') {
modbibitem($bibitemnum,$itemtype,$isbn,$publishercode,$publicationdate,$classification,$dewey,$subclass,$illus,$pages,$volumeddesc,$notes,$size);
if ($itemtype =~ /REF/){
$loan=1;
} else {
$loan=0;
}
for (my $i=0;$i<$count;$i++){
if ($barcodes[$i] ne ''){
moditem($loan,$items[$i]->{'itemnumber'},$bibitemnum);
}
}
}
}
print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");

2
updateitem.pl

@ -73,7 +73,7 @@ my $volumeddesc=checkinp($input->param('Volume'));
# }
#}
#modbibitem($bibitemnum,$itemtype,$isbn,$publishercode,$publicationdate,$classification,$dewey,$subclass,$illus,$pages,$volumeddesc);
moditem($itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn);
moditem('loan',$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn);
print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");
#print $bibitemnum;

Loading…
Cancel
Save