[Koha-patches] [PATCH] Bug 6124: In transferstoreceive.pl some biblios are empty.

Julian Maurice julian.maurice at biblibre.com
Thu Apr 7 17:24:59 CEST 2011


From: Christophe Croullebois <christophe.croullebois at biblibre.com>

Due to the fact that it is possible to have some lines in branchtransfers with an itemnumber that does not exists in table items.
With the patch in this case the line with no biblios is omitted.

BibLibre MT5425
---
 circ/transferstoreceive.pl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl
index 86f7992..161fc75 100755
--- a/circ/transferstoreceive.pl
+++ b/circ/transferstoreceive.pl
@@ -87,6 +87,9 @@ foreach my $br ( keys %$branches ) {
 				$getransf{'diff'} = $diff;
             }
             my $gettitle     = GetBiblioFromItemNumber( $num->{'itemnumber'} );
+            if (!defined ($gettitle)){
+                next;
+            }
             my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $gettitle->{'itype'} : $gettitle->{'itemtype'} );
 
             $getransf{'datetransfer'} = format_date( $num->{'datesent'} );
-- 
1.7.4.1



More information about the Koha-patches mailing list