| Lines 92-97
          my $returnsuggested = $input->param('returnsuggested');
      
      
        Link Here | 
        
          | 92 | my $managedby       = $input->param('managedby'); | 92 | my $managedby       = $input->param('managedby'); | 
        
          | 93 | my $displayby       = $input->param('displayby') || ''; | 93 | my $displayby       = $input->param('displayby') || ''; | 
        
          | 94 | my $tabcode         = $input->param('tabcode'); | 94 | my $tabcode         = $input->param('tabcode'); | 
            
              |  |  | 95 | my $reasonsloop     = GetAuthorisedValues("SUGGEST"); | 
        
          | 95 |  | 96 |  | 
        
          | 96 | # filter informations which are not suggestion related. | 97 | # filter informations which are not suggestion related. | 
        
          | 97 | my $suggestion_ref  = $input->Vars; | 98 | my $suggestion_ref  = $input->Vars; | 
  
    | Lines 133-138
          if ( $op =~ /save/i ) {
      
      
        Link Here | 
        
          | 133 |         $suggestion_only->{manageddate} = dt_from_string; | 134 |         $suggestion_only->{manageddate} = dt_from_string; | 
        
          | 134 |         $suggestion_only->{"managedby"}   = C4::Context->userenv->{number}; | 135 |         $suggestion_only->{"managedby"}   = C4::Context->userenv->{number}; | 
        
          | 135 |     } | 136 |     } | 
            
              |  |  | 137 |  | 
            
              | 138 |     my $otherreason = $input->param('other_reason'); | 
            
              | 139 |     if ($suggestion_only->{reason} eq 'other' && $otherreason) { | 
            
              | 140 |         $suggestion_only->{reason} = $otherreason; | 
            
              | 141 |     } | 
            
              | 142 |  | 
        
          | 136 |     if ( $suggestion_only->{'suggestionid'} > 0 ) { | 143 |     if ( $suggestion_only->{'suggestionid'} > 0 ) { | 
        
          | 137 |         &ModSuggestion($suggestion_only); | 144 |         &ModSuggestion($suggestion_only); | 
        
          | 138 |     } else { | 145 |     } else { | 
  
    | Lines 169-174
          elsif ($op=~/add/) {
      
      
        Link Here | 
        
          | 169 | elsif ($op=~/edit/) { | 176 | elsif ($op=~/edit/) { | 
        
          | 170 |     #Edit suggestion   | 177 |     #Edit suggestion   | 
        
          | 171 |     $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); | 178 |     $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); | 
            
              |  |  | 179 |     $suggestion_ref->{reasonsloop} = $reasonsloop; | 
            
              | 180 |     my $other_reason = 1; | 
            
              | 181 |     foreach my $reason ( @{ $reasonsloop } ) { | 
            
              | 182 |         if ($suggestion_ref->{reason} eq $reason->{lib}) { | 
            
              | 183 |             $other_reason = 0; | 
            
              | 184 |         } | 
            
              | 185 |     } | 
            
              | 186 |     $other_reason = 0 unless $suggestion_ref->{reason}; | 
            
              | 187 |     $template->param(other_reason => $other_reason); | 
        
          | 172 |     Init($suggestion_ref); | 188 |     Init($suggestion_ref); | 
        
          | 173 |     $op ='save'; | 189 |     $op ='save'; | 
        
          | 174 | }   | 190 | }   | 
  
    | Lines 243-249
          if ($op=~/else/) {
      
      
        Link Here | 
        
          | 243 |     push @criteria_dv, '' if $criteria_has_empty; | 259 |     push @criteria_dv, '' if $criteria_has_empty; | 
        
          | 244 |  | 260 |  | 
        
          | 245 |     my @allsuggestions; | 261 |     my @allsuggestions; | 
            
              | 246 |     my $reasonsloop = GetAuthorisedValues("SUGGEST"); |  |  | 
        
          | 247 |     foreach my $criteriumvalue ( @criteria_dv ) { | 262 |     foreach my $criteriumvalue ( @criteria_dv ) { | 
        
          | 248 |         # By default, display suggestions from current working branch | 263 |         # By default, display suggestions from current working branch | 
        
          | 249 |         unless ( exists $$suggestion_ref{'branchcode'} ) { | 264 |         unless ( exists $$suggestion_ref{'branchcode'} ) { | 
            
              | 250 | -  |  |  |