@@ -, +, @@ objects - changes SQL to Koha::AuthorisedValues - remove type param from script tag - fixes the plugin description --- cataloguing/value_builder/stocknumberAV.pl | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) --- a/cataloguing/value_builder/stocknumberAV.pl +++ a/cataloguing/value_builder/stocknumberAV.pl @@ -23,18 +23,18 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; -use C4::Context; use C4::Output; +use Koha::AuthorisedValues; =head1 DESCRIPTION This plugin is based on authorised values INVENTORY. It is used for stocknumber computation. -If the user send an empty string, we return a simple incremented stocknumber. +If no prefix is submitted, or prefix does not contain only nubers, it returns the inserted code (= keep a field unchanged) If a prefix is submited, we look for the highest stocknumber with this prefix, and return it incremented. In this case, a stocknumber has this form : "PREFIX 0009678570". - - PREFIX is an upercase word + - PREFIX contains of letters - a space separator - 10 digits, with leading 0s if needed @@ -43,7 +43,7 @@ In this case, a stocknumber has this form : "PREFIX 0009678570". my $builder = sub { my ( $params ) = @_; my $res = qq{ -