[Koha-bugs] [Bug 15239] Add multiple items fail on barcode

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 14 18:01:10 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15239

--- Comment #7 from Ruben Norori <kachomanic at gmail.com> ---
This is the final solution, this regular expression extracts only the
alphabetical part of the string, and use it in the new item.

my $barcodevalue = $oldbarcode;
            my $exist_itemnumber;
            my $newv = $barcodevalue;
            $newv =~ s/[^a-zA-Z,]//g;

            for (my $i = 0; $i < $number_of_copies;) {

                # If there is a barcode
                if ($barcodevalue) {
                    # Getting a new barcode (if it is not the first iteration
or the barcode we tried already exists)
                    $barcodevalue = $newv.$barcodeobj->next_value($oldbarcode)
if ($i > 0 || $exist_itemnumber);

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list