[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6474 Barcode not incrementing properly in format HBYYMMINCR if HB contains -
Julian Maurice
julian.maurice at biblibre.com
Fri Jul 8 11:33:10 CEST 2011
From: Sophie Meynieux <sophie.meynieux at biblibre.com>
Adding - to regexp for matching branch code. Wondering if other characters should not be added too.
Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
---
cataloguing/value_builder/barcode.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cataloguing/value_builder/barcode.pl b/cataloguing/value_builder/barcode.pl
index c05ec48..c5e1fd3 100755
--- a/cataloguing/value_builder/barcode.pl
+++ b/cataloguing/value_builder/barcode.pl
@@ -102,7 +102,7 @@ sub plugin_javascript {
$year = substr($year, -2);
$query = "SELECT MAX(CAST(SUBSTRING(barcode,-4) AS signed)) AS number FROM items WHERE barcode REGEXP ?";
my $sth = $dbh->prepare($query);
- $sth->execute("^[a-zA-Z]{1,}$year");
+ $sth->execute("^[-a-zA-Z]{1,}$year");
while (my ($count)= $sth->fetchrow_array) {
$nextnum = $count if $count;
$nextnum = 0 if $nextnum == 9999; # this sequence only allows for cataloging 10000 books per month
--
1.7.5.4
More information about the Koha-patches
mailing list