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>