koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/acqui.simple addbooks.pl,1.5.2.3,1.5.2.4


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/acqui.simple addbooks.pl,1.5.2.3,1.5.2.4
Date: Thu, 27 Jun 2002 09:26:54 -0700

Update of /cvsroot/koha/koha/acqui.simple
In directory usw-pr-cvs1:/tmp/cvs-serv27122

Modified Files:
      Tag: rel-1-2
        addbooks.pl 
Log Message:
Re-enabling the max(barcode) + 1 behaviour.  Checks that the last digit is a
number before adding 1.  If the last digit isn't a number, fall back to Roger's
behaviour of using biblionumber as barcode.


Index: addbooks.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbooks.pl,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -C2 -r1.5.2.3 -r1.5.2.4
*** addbooks.pl 26 Jun 2002 21:58:45 -0000      1.5.2.3
--- addbooks.pl 27 Jun 2002 16:26:52 -0000      1.5.2.4
***************
*** 320,327 ****
  EOF
        }
! #     my $sth=$dbh->prepare("select max(barcode) from items");
! #     $sth->execute;
! #     my ($maxbarcode) = $sth->fetchrow;
! #     $maxbarcode++;
  #       print STDERR "MaxBarcode: $maxbarcode \n";
        print << "EOF";
--- 320,333 ----
  EOF
        }
!       my $sth=$dbh->prepare("select max(barcode) from items");
!       $sth->execute;
!       my ($maxbarcode) = $sth->fetchrow;
!       if ($maxbarcode=~/\d$/) {
!           # maxbarcode ends in a digit
!           $maxbarcode++;
!       } else {
!           $maxbarcode=$biblionumber;
!       }
!       $maxbarcode++;
  #       print STDERR "MaxBarcode: $maxbarcode \n";
        print << "EOF";
***************
*** 333,338 ****
  <input type=hidden name=biblioitemnumber value=$biblioitemnumber>
  <table>
! <!-- tr><td>BARCODE</td><td><input name=barcode size=10 value=\$maxbarcode 
--> 
! <tr><td>BARCODE</td><td><input name=barcode size=10 value=$biblionumber> 
  Home Branch: <select name=homebranch>
  EOF
--- 339,344 ----
  <input type=hidden name=biblioitemnumber value=$biblioitemnumber>
  <table>
! <tr><td>BARCODE</td><td><input name=barcode size=10 value=$maxbarcode> 
! <!-- <tr><td>BARCODE</td><td><input name=barcode size=10 value=$biblionumber> 
--> 
  Home Branch: <select name=homebranch>
  EOF




reply via email to

[Prev in Thread] Current Thread [Next in Thread]