From 55127d50fb0a00f70d5de06dee76ddfad54bd094 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Wed, 21 Oct 2015 13:11:28 +0200 Subject: [PATCH] Bug 15042: Barcode hbyymmincr does not work when receiving serials MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: - Set autoBarcode = yymm0001 - Make sure you have a serial that is set to "create an item record when receiving this serial" - Receive an issue - Click in the barcode field - nothing happens - Apply patch and reload page - Receive an issue - Click in the barcode field - a barcode conforming to the hbyymmincr setting appears Patch works as advertised. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/Barcodes/ValueBuilder.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Barcodes/ValueBuilder.pm b/C4/Barcodes/ValueBuilder.pm index c8cfe595cb..81747dee67 100644 --- a/C4/Barcodes/ValueBuilder.pm +++ b/C4/Barcodes/ValueBuilder.pm @@ -61,6 +61,9 @@ sub get_barcode { warn "New hbyymmincr Barcode = $nextnum" if $DEBUG; my $scr = " var form = document.getElementById('f'); + if ( !form ) { + form = document.getElementById('serials_edit'); + } if ( !form ) { form = document.getElementById('Aform'); } -- 2.20.1