Bug 15042: Barcode hbyymmincr does not work when receiving serials
authorMagnus Enger <magnus@libriotech.no>
Wed, 21 Oct 2015 11:11:28 +0000 (13:11 +0200)
committerLiz Rea <wizzyrea@gmail.com>
Thu, 29 Oct 2015 23:05:45 +0000 (12:05 +1300)
To test:
- Set autoBarcode = <branchcode>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 <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 55127d50fb0a00f70d5de06dee76ddfad54bd094)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 2067f598760848cbef6b56d26d97ec9d44d566fe)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>

C4/Barcodes/ValueBuilder.pm

index c8cfe59..81747de 100644 (file)
@@ -62,6 +62,9 @@ sub get_barcode {
     my $scr = "
         var form = document.getElementById('f');
         if ( !form ) {
+            form = document.getElementById('serials_edit');
+        }
+        if ( !form ) {
             form = document.getElementById('Aform');
         }
         for (i=0 ; i<form.field_value.length ; i++) {