Bug 21395: Make perlcritic happy
[srvgit] / C4 / Barcodes / ValueBuilder.pm
index 81747de..479a436 100644 (file)
@@ -19,6 +19,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 package C4::Barcodes::ValueBuilder::incremental;
+
+use Modern::Perl;
 use C4::Context;
 my $DEBUG = 0;
 
@@ -89,7 +91,7 @@ sub get_barcode {
     my $nextnum;
     my $query = "select max(cast( substring_index(barcode, '-',-1) as signed)) from items where barcode like ?";
     my $sth=C4::Context->dbh->prepare($query);
-    $sth->execute("$args->{year}%");
+    $sth->execute($args->{year} . '-%');
     while (my ($count)= $sth->fetchrow_array) {
         warn "Examining Record: $count" if $DEBUG;
         $nextnum = $count if $count;