[Koha-patches] [PATCH] (bug #4487) permit - and . in callnumber plugin

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Wed May 12 13:44:32 CEST 2010


---
 cataloguing/value_builder/callnumber.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cataloguing/value_builder/callnumber.pl b/cataloguing/value_builder/callnumber.pl
index ecdaea4..17b6282 100755
--- a/cataloguing/value_builder/callnumber.pl
+++ b/cataloguing/value_builder/callnumber.pl
@@ -95,7 +95,8 @@ sub plugin {
             );
         }
     # If a prefix is submited, we look for the highest itemcallnumber with this prefix, and return it incremented
-    } elsif ( $code =~ m/^[A-Z]+$/ ) {
+    } elsif ( $code =~ m/^[A-Z.\-]+$/ ) {
+        warn $code;
         my $sth = $dbh->prepare("SELECT MAX(CAST(SUBSTRING_INDEX(itemcallnumber,' ',-1) AS SIGNED)) FROM items WHERE itemcallnumber LIKE ?");
         $sth->execute($code.' %');
         if ( my $max = $sth->fetchrow ) {
-- 
1.7.0.4




More information about the Koha-patches mailing list