Revert "Fix the guided report export, bad check of errors(bug #2672)"
[koha.git] / circ / circulation.pl
index 0edf97d..631df50 100755 (executable)
@@ -181,6 +181,14 @@ if ($findborrower) {
     my ( $count, $borrowers ) =
       SearchMember($findborrower, 'cardnumber', 'web' );
     my @borrowers = @$borrowers;
+        $template->param(
+                "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1",
+        );
+        if (C4::Context->preference("AddPatronLists")=~/code/){
+                my $categories=GetBorrowercategoryList;
+                $categories->[0]->{'first'}=1;
+                $template->param(categories=>$categories);
+        }
     if ( $#borrowers == -1 ) {
         $query->param( 'findborrower', '' );
         $message = "'$findborrower'";
@@ -256,10 +264,14 @@ if ($barcode) {
 
   delete $question->{'DEBT'} if ($debt_confirmed);
   foreach my $impossible ( keys %$error ) {
+            if ($impossible eq "NOT_FOR_LOAN_CAN_FORCE"){
+                $$question{$impossible}=$$error{$impossible},
+            } else {
             $template->param(
                 $impossible => $$error{$impossible},
                 IMPOSSIBLE  => 1
             );
+            }
             $noerror = 0;
         }