Bug 7992: New plugin stocknumberAV
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 30 Aug 2012 13:31:14 +0000 (15:31 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 2 Oct 2012 15:19:55 +0000 (17:19 +0200)
commit6c0aa43ee1d149dc53977251dc4396d9d7cb8760
treed796ce5662c00bf5168b4e9df83d2a226c43d9cb
parent514b32898e8169c9bb4e3e7d683fdbf7ed8fe55d
Bug 7992: New plugin stocknumberAV

Bugzilla description (from delaye):
1 / Create a list of authorised values(INVENTORY_NUMBER). In which the
code is the prefix and the description the last number assigned.

2/A space between the prefix and number.

3 / From a holding record, after indicate the prefix when you click on
the plugin -> koha search the last number from authorised values
assigned in the list and increment n +1 level meter

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Works as advertised (see provisos below). Tested the following:
1) INVENTORY category has only authorised value 'PR' => PR prefix filled
   in, everything else gives an error.
2) INVENTORY category has two authorised values, both work.
3) INVENTORY category has no authorised values, nothing is incremented
4) Barcode contains numbers, nothing is changed.
Two potential gotchas (neither of them significant enough to warrant
changing, in my opinion):
1) Prefixes must consist only of uppercase alphabetical characters.
2) Negative numbers are padded with zeros to the left of the negative
   sign.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
cataloguing/value_builder/stocknumberAV.pl [new file with mode: 0755]