Ah, I see you already got the second suggestion. One comment about that though, my libraries all have branch codes that are numbers. So this filter would be broken in that case.
On Thu, Nov 18, 2010 at 7:12 AM, Koustubha Kale <kmk...@anantcorp.com>wrote: ... > diff --git a/C4/Circulation.pm b/C4/Circulation.pm > index 10c3c11..219991e 100644 > --- a/C4/Circulation.pm > +++ b/C4/Circulation.pm > @@ -136,7 +136,7 @@ System Pref options. > # FIXME -- these plugins should be moved out of Circulation.pm > # > sub barcodedecode { > - my ($barcode, $filter) = @_; > + my ($barcode, $filter, $branch) = @_; > $filter = C4::Context->preference('itemBarcodeInputFilter') unless > $filter; > $filter or return $barcode; # ensure filter is defined, else return > untouched barcode > if ($filter eq 'whitespace') { > @@ -155,6 +155,10 @@ sub barcodedecode { > # FIXME: $barcode could be "T1", causing warning: substr outside of > string > # Why drop the nonzero digit after the T? > # Why pass non-digits (or empty string) to "T%07d"? > + } elsif ($filter eq 'libsuite8') { > + unless($barcode =~ m/^($branch)-/i){ > + $barcode =~ s/^(\D+)[0]*(\d+)$/$branch-$1-$2/i > + } > } > return $barcode; # return barcode, modified or not > } > ...
_______________________________________________ Koha-patches mailing list Koha-patches@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/