# FIXME subs that should probably be elsewhere
push @EXPORT, qw(
&FixOverduesOnReturn
+ &cuecatbarcodedecode
);
# subs to deal with issuing a book
# subs to remove
push @EXPORT, qw(
- &decode
&dotransfer
);
+# FIXME - At least, I'm pretty sure this is for decoding CueCat stuff.
+# FIXME From Paul : i don't understand what this sub does & why it has to be called on every circ. Speak of this with chris maybe ?
+
=head2 decode
=head3 $str = &decode($chunk);
=cut
-# FIXME - At least, I'm pretty sure this is for decoding CueCat stuff.
+sub cuecatbarcodedecode {
+ my ($barcode) = @_;
+ chomp($barcode);
+ my @fields = split( /\./, $barcode );
+ my @results = map( decode($_), @fields[ 1 .. $#fields ] );
+ if ( $#results == 2 ) {
+ return $results[2];
+ }
+ else {
+ return $barcode;
+ }
+}
+
+=head2 decode
+
+=head3 $str = &decode($chunk);
+
+=over 4
+
+=item Decodes a segment of a string emitted by a CueCat barcode scanner and
+returns it.
+
+=back
+
+=cut
-# FIXME From Paul : i don't understand what this sub does & why it has to be called on every circ. Speak of this with chris maybe ?
sub decode {
my ($encoded) = @_;
my $seq =
return ( $dotransfer, $messages, $biblio );
}
-# Not exported
-# FIXME - This is only used in &transferbook. Why bother making it a
-# separate function?
sub dotransfer {
my ( $itm, $fbr, $tbr ) = @_;
$renewokay = 1;
}
$sth2->finish;
- my ( $resfound, $resrec ) = C4::Reserves2::CheckReserves($itemnumber);
+ my ( $resfound, $resrec ) = CheckReserves($itemnumber);
if ($resfound) {
$renewokay = 0;
}
- ( $resfound, $resrec ) = C4::Reserves2::CheckReserves($itemnumber);
+ ( $resfound, $resrec ) = CheckReserves($itemnumber);
if ($resfound) {
$renewokay = 0;
}