Lines 94-104
sub max {
Link Here
|
94 |
return $self->db_max; |
94 |
return $self->db_max; |
95 |
} |
95 |
} |
96 |
sub db_max { |
96 |
sub db_max { |
97 |
my $self = shift; |
97 |
my $self = shift; |
98 |
my $query = "SELECT max(abs(CAST(barcode AS UNSIGNED))) FROM items LIMIT 1"; # Possible problem if multiple barcode types populated |
98 |
my $query = "SELECT max(abs(CAST(barcode AS UNSIGNED))) FROM items LIMIT 1" |
99 |
my $sth = C4::Context->dbh->prepare($query); |
99 |
; # Possible problem if multiple barcode types populated |
100 |
$sth->execute(); |
100 |
my $sth = C4::Context->dbh->prepare($query); |
101 |
return $sth->fetchrow_array || $self->initial; |
101 |
$sth->execute(); |
|
|
102 |
return $sth->fetchrow_array || $self->initial; |
102 |
} |
103 |
} |
103 |
sub next_value { |
104 |
sub next_value { |
104 |
my $self = shift; |
105 |
my $self = shift; |