[Koha-patches] [PATCH 44/55] (MT #2970) fix returning document with branch transfert limits

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Mar 10 22:26:26 CET 2010


From: Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com>

This fix differents stuffs:
 * change button labels
 * fix input hidden values that wasn't set
 * fix "checked in" items box, to don't show items that are in wrong branch

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
---
 circ/returns.pl |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/circ/returns.pl b/circ/returns.pl
index 6898087..0672312 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -246,7 +246,7 @@ if ($barcode) {
         $input{return_overdue} = 1 if ($duedate and $duedate lt $today->output('iso'));
         push( @inputloop, \%input );
     }
-    elsif ( !$messages->{'BadBarcode'} ) {
+    elsif ( !$messages->{'BadBarcode'} and ! $messages->{'Wrongbranch'} ) {
         $input{duedate}   = 0;
         $returneditems{0} = $barcode;
         $riduedate{0}     = 0;
@@ -287,9 +287,12 @@ if ( $messages->{'NeedsTransfer'} ){
 }
 
 if ( $messages->{'Wrongbranch'} ){
-    $template->param(
-        wrongbranch => 1,
-    );
+	$template->param(
+		wrongbranch => 1,
+		barcode     => $barcode,
+		exemptfine  => $exemptfine,
+		dropboxmode => $dropboxmode,
+	);
 }
 
 # case of wrong transfert, if the document wasn't transfered to the right library (according to branchtransfer (tobranch) BDD)
-- 
1.6.3.3




More information about the Koha-patches mailing list