[Koha-devel] barcode question

Chris Nighswonger cnighswonger at foundations.edu
Thu Mar 17 17:56:20 CET 2011


 2011/3/17 pete huerter <pete.huerter at gmail.com>

> Hi list,
>
> I am trying to understand all code related to barcodes.
>
> 1.  It appears that C4::Barcodes is only used in additem.pl.  Additem.pl
> appears not to be involved in batch processing.
>

I can't speak to batch processing as I've not slogged through that section
of code, but a quick grep of the codebase shows C4::Barcodes being used in
multiple places... about 48...


> 2.  952$p (barcode) does not appear in the Add Item Koha screen, so the
> plugin is not callable.
>
> If all this is true, then whey is there a barcode.pl value_builder?  When
> would it be called?
>
>
952$p visibility is based on your framework. Using the default "Books,
Booklets, Workbooks" framework it is visible. (See
http://tinyurl.com/68ngc74) That is where it is called from. It populates
when that field gets the focus iirc.



> Is the barcode.pl value_builder only invoked when AutoBarcode type is
> "NONE"?  In which case the code in barcode.pl value_builder effectively
> replaces that in C4::Barcodes? (the logic of the various barcode types
> appears to be duplicated in barcode.pl).
>
>
C4::Barcode is used by additem.pl when adding multiple copies. The plugin
only supplies a single barcode value to the 952$p field. C4::Barcode has a
next_value method which will take a barcode and return the next valid value
among other methods. You'll just have to read through the code to discover
the methods and what they do as the POD is non-existent... which I'm sure
you've done and noticed.... ;-)


> Can I just customize barcode.pl to effectively solve the problem of
> assigning barcodes leaving C4::Barcodes, and C4/Barcodes/* untouched? -or-
> are is modification of both methods necessary for some reason?
>

I would say that for the moment you need to mod both or the ability to add
multiple items might be broken.

Kind Regards,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20110317/68602afe/attachment-0001.htm>


More information about the Koha-devel mailing list