add routine to calculate Code 39 mod 43 barcode checkdigits
authorGalen Charlton <gmc@esilibrary.com>
Mon, 22 Sep 2014 18:44:03 +0000 (14:44 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 22 Sep 2014 18:44:03 +0000 (14:44 -0400)
commit41eb73e7b28d8b05c6f9a150e7e497badae8cdd4
treead5705d5bda7fd8311398c1768f0b27fa9bc26b1
parenta8c8d06ed95e6a8c107279b57a6f3cedb6e25eb4
add routine to calculate Code 39 mod 43 barcode checkdigits

migration_tools.add_code39mod43_checkdigit($barcode);
If the source string is 13 or 14 characters long and contains only valid
Code 39 mod 43 characters, adds or replaces the 14th
character with a checkdigit computed according to the usual algorithm for library barcodes
using the Code 39 mod 43 symbology - see <http://en.wikipedia.org/wiki/Code_39#Code_39_mod_43>.  If the
input string does not meet those requirements, it is returned unchanged.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
sql/base/base.sql