[Koha-bugs] [Bug 15239] Add multiple items fail on barcode
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Aug 11 18:27:39 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15239
Ruben Norori <kachomanic at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kachomanic at gmail.com
--- Comment #4 from Ruben Norori <kachomanic at gmail.com> ---
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.
More information about the Koha-bugs
mailing list