Bug 5213 - Suffix number sequence not resetting properly in hmyymmincr barcode autoge...
authorChris Nighswonger <cnighswonger@foundations.edu>
Tue, 5 Apr 2011 09:50:48 +0000 (11:50 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 7 Apr 2011 03:42:40 +0000 (15:42 +1200)
commit8ca5d5ff85c429ee972b3f80f91f5b27a58cf5d5
treed6b68a5903b525955bb22f3bb4a036533ce7661e
parentd58092dd96383378f8abdce92d07c1795c617f97
Bug 5213 - Suffix number sequence not resetting properly in hmyymmincr barcode autogen pattern

Two things are happening.

First, the SELECT does not account for a branchcode greater than 2 chars.

This is fixed by just selecting the final four digits representing the
incremental suffix from the barcode field.

Second, the incremental suffix (4 digits) is not rolling back over to zero when
reaching 9999.

This pattern probably needs help. It should allow for cataloging of 10000 items
per month as is. I would not recommend doing barcode numbering this way, but
need to support it since it is in use in at least one library.

This patch also impliments strict and warnings per Bug 2505

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
cataloguing/value_builder/barcode.pl