From 46a55fb4bbee0491aba4e5f51a711469a915d3c3 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 9 Mar 2012 16:34:47 -0500 Subject: [PATCH] Bug 4976 - Status of item returned with process_koc.pl is empty in Intranet Fix to ensure items returned through a processed koc file have items.onloan and items.datelastseen set corrrectly. Signed-off-by: Nicole C. Engard Uploaded a file with checked in and checked out items. all info shows properly. Signed-off-by: Paul Poulain Signed-off-by: Jared Camins-Esakov --- offline_circ/process_koc.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/offline_circ/process_koc.pl b/offline_circ/process_koc.pl index 6c48ffb4ce..854a338900 100755 --- a/offline_circ/process_koc.pl +++ b/offline_circ/process_koc.pl @@ -29,6 +29,7 @@ use C4::Context; use C4::Biblio; use C4::Accounts; use C4::Circulation; +use C4::Items; use C4::Members; use C4::Stats; use C4::UploadedFile; @@ -323,7 +324,7 @@ sub kocReturnItem { #warn( Data::Dumper->Dump( [ $circ, $item ], [ qw( circ item ) ] ) ); my $borrowernumber = _get_borrowernumber_from_barcode( $circ->{'barcode'} ); if ( $borrowernumber ) { - my $borrower = GetMember( 'borrowernumber' =>$borrowernumber ); + my $borrower = GetMember( 'borrowernumber' => $borrowernumber ); C4::Circulation::MarkIssueReturned( $borrowernumber, $item->{'itemnumber'}, @@ -331,6 +332,9 @@ sub kocReturnItem { $circ->{'date'} ); + ModItem({ onloan => undef }, $item->{'biblionumber'}, $item->{'itemnumber'}); + ModDateLastSeen( $item->{'itemnumber'} ); + push @output, { return => 1, title => $item->{ 'title' }, -- 2.39.5