[Koha-patches] [PATCH] Tweak offline_circ - honor itemBarcodeInputFilter and add to Makefile.PL
Michael Hafen
mdhafen at tech.washk12.org
Tue May 5 23:01:09 CEST 2009
Add the ofline_circ directory to Makefile.PL as needing to be installed.
Add calls to barcodedecode() on issueing and returning.
---
Makefile.PL | 1 +
offline_circ/process_koc.pl | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 1445690..f399684 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -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 },
diff --git a/offline_circ/process_koc.pl b/offline_circ/process_koc.pl
index 093d34c..87ae5c1 100755
--- a/offline_circ/process_koc.pl
+++ b/offline_circ/process_koc.pl
@@ -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'} );
--
1.5.6.3
More information about the Koha-patches
mailing list