Lines 58-68
sub Init{
Link Here
|
58 |
|
58 |
|
59 |
sub GetCriteriumDesc{ |
59 |
sub GetCriteriumDesc{ |
60 |
my ($criteriumvalue,$displayby)=@_; |
60 |
my ($criteriumvalue,$displayby)=@_; |
61 |
unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED ORDERED AVAILABLE) ) { |
61 |
if ($displayby =~ /status/i ) { |
|
|
62 |
if ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED ORDERED AVAILABLE) ) { |
63 |
return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) |
64 |
} |
65 |
else { |
62 |
return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || $criteriumvalue; |
66 |
return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || $criteriumvalue; |
|
|
67 |
} |
68 |
} |
69 |
if ($displayby =~/branchcode/) { |
70 |
return (GetBranchName($criteriumvalue)) || "Any"; |
63 |
} |
71 |
} |
64 |
return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); |
|
|
65 |
return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); |
66 |
return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); |
72 |
return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); |
67 |
if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){ |
73 |
if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){ |
68 |
my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); |
74 |
my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); |
Lines 86-91
my $returnsuggested = $input->param('returnsuggested');
Link Here
|
86 |
my $managedby = $input->param('managedby'); |
92 |
my $managedby = $input->param('managedby'); |
87 |
my $displayby = $input->param('displayby') || ''; |
93 |
my $displayby = $input->param('displayby') || ''; |
88 |
my $tabcode = $input->param('tabcode'); |
94 |
my $tabcode = $input->param('tabcode'); |
|
|
95 |
my $branchcodesel = $input->param('branchcode'); |
89 |
|
96 |
|
90 |
# filter informations which are not suggestion related. |
97 |
# filter informations which are not suggestion related. |
91 |
my $suggestion_ref = $input->Vars; |
98 |
my $suggestion_ref = $input->Vars; |
Lines 209-215
if ($op=~/else/) {
Link Here
|
209 |
my $reasonsloop = GetAuthorisedValues("SUGGEST"); |
216 |
my $reasonsloop = GetAuthorisedValues("SUGGEST"); |
210 |
foreach my $criteriumvalue ( @criteria_dv ) { |
217 |
foreach my $criteriumvalue ( @criteria_dv ) { |
211 |
# By default, display suggestions from current working branch |
218 |
# By default, display suggestions from current working branch |
212 |
unless ( exists $$suggestion_ref{'branchcode'} ) { |
219 |
unless ( exists $$suggestion_ref{'branchcode'} || $branchcodesel eq "__ANY__" ) { |
213 |
$$suggestion_ref{'branchcode'} = C4::Context->userenv->{'branch'}; |
220 |
$$suggestion_ref{'branchcode'} = C4::Context->userenv->{'branch'}; |
214 |
} |
221 |
} |
215 |
my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne ""; |
222 |
my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne ""; |
216 |
- |
|
|