[Bug 15239] Add multiple items fail on barcode

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 15239] Add multiple items fail on barcode

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

Ruben Norori <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from Ruben Norori <[hidden email]> ---
I have a solution, you must go to the route:
/usr /share/koha/intranet/cgi-bin/cataloging  search the additem.pl file and
open it with your text editor.

Search this code:
# For the first iteration
            my $barcodevalue = $oldbarcode;
            my $exist_itemnumber;

            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 = $barcodeobj->next_value($oldbarcode) if ($i
> 0 || $exist_itemnumber);


Replace it with:
# For the first iteration
            my $barcodevalue = $oldbarcode;
            my $exist_itemnumber;
            my $valor = substr($barcodevalue, 0, 3);

            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 = $valor.$barcodeobj->next_value($oldbarcode)
if ($i > 0 || $exist_itemnumber);


Make a back up of the file before try this. Works for me.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/