[Koha-devel] Customizing Barcode Checkdigit Subroutine

Larry Currie lcurrie at CalAcademy.Org
Fri Dec 20 11:57:02 CET 2002


Under our current library system, we use 14 digit patron barcodes, and
the 14th digit is determined as follows:

1.  Multiply every other digit starting with the leftmost by 2 and total
the digits of any multi-digit product.  Sum the resulting digits.

2.  Add remainder of digits (every other digit starting with the second
from the left).

3.  Add result of step 1 and step 2 and substract the rightmost digit of
the sum from 10 to obtain the check digit.

Example:

       Given:   2 1 1 1 2 0 0 0 6 9 8 1 3 C     (C to be determined)

(mult by 2)   4    2    4    0    12 16   6     sum = 26    step 1

                      1    1    0    0    9    1         sum = 12   step
2

Step 3:       26
           +    12
              -----
                 38           10 - 8 = 2 = check digit.

Back in January, I tried to modify the checkdigit subroutine of Input.pm
to fit our circumstances, but I'm not sure that my code was completely
successful.  Would anyone want to take a shot at modifying this
subroutine to fit our circumstances, since we would like to use our
existing patron barcodes in Koha?

Larry Currie

--
Lawrence W. Currie
User Services Librarian
California Academy of Sciences
Golden Gate Park
San Francisco, CA 94118
lcurrie at calacademy.org
(415) 750-7108
(415) 750-7106 fax
http://www.calacademy.org/research/library/






More information about the Koha-devel mailing list