From 384777c83d53a7a5e5cdce87622b03f22c698b48 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Wed, 31 Jul 2024 11:32:50 +0200 Subject: [PATCH] Bug 8425: Add an offset parameter for barcode generation in hbyymmincr barcode.pl In order to propose a patch for 8425 and 30056, we need to have the possibility to ask for multiple barcodes without storing a new barcode. See 8425 and 30056 for more information. Note: Since 30056 also needs this patch, these are splitted in order to rebase easier --- C4/Barcodes/ValueBuilder.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Barcodes/ValueBuilder.pm b/C4/Barcodes/ValueBuilder.pm index 76464cc..8e86119 100644 --- a/C4/Barcodes/ValueBuilder.pm +++ b/C4/Barcodes/ValueBuilder.pm @@ -63,8 +63,11 @@ sub get_barcode { .siblings("select") .val(); + if(typeof offset == 'undefined'){ + var offset = 0; + } if ( \$(elt).val() == '' ) { - \$(elt).val(homebranch + '$nextnum'); + \$(elt).val(homebranch + ($nextnum + offset)); } ~; return $nextnum, $scr; -- 2.43.0