View | Details | Raw Unified | Return to bug 3577
Collapse All | Expand All

(-)a/cataloguing/value_builder/barcode.pl (-2 / +1 lines)
Lines 99-105 sub plugin_javascript { Link Here
99
    }
99
    }
100
    elsif ($autoBarcodeType eq 'hbyymmincr') {      # Generates a barcode where hb = home branch Code, yymm = year/month catalogued, incr = incremental number, reset yearly -fbcit
100
    elsif ($autoBarcodeType eq 'hbyymmincr') {      # Generates a barcode where hb = home branch Code, yymm = year/month catalogued, incr = incremental number, reset yearly -fbcit
101
        $year = substr($year, -2);
101
        $year = substr($year, -2);
102
        $query = "SELECT MAX(CAST(SUBSTRING(barcode,7,4) AS signed)) FROM items WHERE barcode REGEXP ?";
102
        $query = "SELECT MAX(CAST(SUBSTRING(barcode,-4,4) AS signed)) FROM items WHERE barcode REGEXP ?";
103
        my $sth = $dbh->prepare($query);
103
        my $sth = $dbh->prepare($query);
104
        $sth->execute("^[a-zA-Z]{1,}$year");
104
        $sth->execute("^[a-zA-Z]{1,}$year");
105
        while (my ($count)= $sth->fetchrow_array) {
105
        while (my ($count)= $sth->fetchrow_array) {
106
- 

Return to bug 3577