Bug 6448 [1/3] EAN-13/UPC-A itemBarcodeInputFilter
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Mar 2012 22:38:34 +0000 (00:38 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 2 Aug 2012 16:41:40 +0000 (18:41 +0200)
commit089b1151f5d9222e7171060b9d352e2a22a1be2b
treeaabd12c043c1e5818f5526e24a7a765366f2a6f7
parent18d4772323e8b7b248c2f2f1486d6e216e9d6aae
Bug 6448 [1/3] EAN-13/UPC-A itemBarcodeInputFilter

This filter which check validity of EAN-13 barcode and padd it with zeros
up to full 13 digit number. This will also expand 12 digit UPC-A barcodes
to EAN-13 automatically which is useful for older barcode readers which tend
to ignore first zero in EAN-13 if they have just UPC-A support.

It should be noted that EAN-13 or UPC-A product codes printed on books are not
good choice for barcodes in Koha since each item has to have unique barcode.

Test scenario:

1. prove t/Circulation_barcodedecode.t
   this checks expansion of 12 digit UPC-A to 13 digit EAN-13 and zero padding

2. in systempreferences search for itemBarcodeInputFilter and select EAN-13

3. edit one item and assign it valid EAN-13 barcode, eg. 0000000695152, check it out

4. test checkin with just 695152 to test leading zero expansion

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
C4/Circulation.pm
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
t/Circulation_barcodedecode.t