Tweak offline_circ - honor itemBarcodeInputFilter and add to Makefile.PL
authorMichael Hafen <mdhafen@tech.washk12.org>
Tue, 5 May 2009 21:01:09 +0000 (15:01 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 8 May 2009 14:09:53 +0000 (09:09 -0500)
Add the ofline_circ directory to Makefile.PL as needing to be installed.
Add calls to barcodedecode() on issueing and returning.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>

Makefile.PL
offline_circ/process_koc.pl

index 1445690..f399684 100644 (file)
@@ -250,6 +250,7 @@ my $target_map = {
   './changelanguage.pl'         => 'INTRANET_CGI_DIR',
   './check_sysprefs.pl'         => 'NONE',
   './circ'                      => 'INTRANET_CGI_DIR',
+  './offline_circ'             => 'INTRANET_CGI_DIR',
   './edithelp.pl'               => 'INTRANET_CGI_DIR',
   './etc'                       => { target => 'KOHA_CONF_DIR', trimdir => -1 },
   './etc/zebradb'               => { target => 'ZEBRA_CONF_DIR', trimdir => -1 },
index 093d34c..87ae5c1 100755 (executable)
@@ -237,6 +237,7 @@ sub arguments_for_command {
 sub kocIssueItem {
   my $circ = shift;
 
+  $circ->{ 'barcode' } = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter'));
   my $branchcode = C4::Context->userenv->{branch};
   my $borrower = GetMember( $circ->{ 'cardnumber' }, 'cardnumber' );
   my $item = GetBiblioFromItemNumber( undef, $circ->{ 'barcode' } );
@@ -321,6 +322,7 @@ sub kocIssueItem {
 
 sub kocReturnItem {
   my ( $circ ) = @_;
+  $circ->{'barcode'} = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter'));
   my $item = GetBiblioFromItemNumber( undef, $circ->{ 'barcode' } );
   #warn( Data::Dumper->Dump( [ $circ, $item ], [ qw( circ item ) ] ) );
   my $borrowernumber = _get_borrowernumber_from_barcode( $circ->{'barcode'} );