|
Lines 56-62
sub GetCriteriumDesc{
Link Here
|
| 56 |
return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); |
56 |
return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); |
| 57 |
return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); |
57 |
return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); |
| 58 |
return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); |
58 |
return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); |
| 59 |
if ($displayby =~/managedby/||$displayby =~/acceptedby/){ |
59 |
if ( $displayby =~ /managedby/ || $displayby =~ /acceptedby/ || $displayby =~ /suggestedby/) { |
| 60 |
my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); |
60 |
my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); |
| 61 |
return "" unless $borr; |
61 |
return "" unless $borr; |
| 62 |
return $$borr{firstname} . ", " . $$borr{surname}; |
62 |
return $$borr{firstname} . ", " . $$borr{surname}; |
|
Lines 125-130
elsif ($op=~/edit/) {
Link Here
|
| 125 |
#Edit suggestion |
125 |
#Edit suggestion |
| 126 |
$suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); |
126 |
$suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); |
| 127 |
Init($suggestion_ref); |
127 |
Init($suggestion_ref); |
|
|
128 |
<<<<<<< HEAD |
| 128 |
$op ='save'; |
129 |
$op ='save'; |
| 129 |
} |
130 |
} |
| 130 |
elsif ($op eq "change" ) { |
131 |
elsif ($op eq "change" ) { |
|
Lines 146-151
elsif ($op eq "change" ) {
Link Here
|
| 146 |
foreach (keys %$suggestion_ref){ |
147 |
foreach (keys %$suggestion_ref){ |
| 147 |
delete $$suggestion_ref{$_} unless ($$suggestion_ref{$_}); |
148 |
delete $$suggestion_ref{$_} unless ($$suggestion_ref{$_}); |
| 148 |
} |
149 |
} |
|
|
150 |
======= |
| 151 |
$op = 'save'; |
| 152 |
} elsif ( $op eq "change" ) { |
| 153 |
if ( $$suggestion_ref{"STATUS"} ) { |
| 154 |
if ( my $tmpstatus = lc( $$suggestion_ref{"STATUS"} ) =~ /ACCEPTED|REJECTED/i ) { |
| 155 |
$$suggestion_ref{ lc( $$suggestion_ref{"STATUS"}) . "date" } = C4::Dates->today; |
| 156 |
$$suggestion_ref{ lc( $$suggestion_ref{"STATUS"}) . "by" } = C4::Context->userenv->{number}; |
| 157 |
} |
| 158 |
$$suggestion_ref{"manageddate"} = C4::Dates->today; |
| 159 |
$$suggestion_ref{"managedby"} = C4::Context->userenv->{number}; |
| 160 |
} |
| 161 |
if ( my $reason = $$suggestion_ref{"reason$tabcode"} ) { |
| 162 |
if ( $reason eq "other" ) { |
| 163 |
$reason = $$suggestion_ref{"other_reason$tabcode"}; |
| 164 |
} |
| 165 |
$$suggestion_ref{'reason'} = $reason; |
| 166 |
} |
| 167 |
delete $$suggestion_ref{$_} foreach ( "reason$tabcode", "other_reason$tabcode" ); |
| 168 |
foreach ( keys %$suggestion_ref ) { |
| 169 |
delete $$suggestion_ref{$_} unless ( $$suggestion_ref{$_} ); |
| 170 |
} |
| 171 |
>>>>>>> (BUG #4811) suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by) |
| 149 |
foreach my $suggestionid (@editsuggestions) { |
172 |
foreach my $suggestionid (@editsuggestions) { |
| 150 |
next unless $suggestionid; |
173 |
next unless $suggestionid; |
| 151 |
$$suggestion_ref{'suggestionid'}=$suggestionid; |
174 |
$$suggestion_ref{'suggestionid'}=$suggestionid; |
| 152 |
- |
|
|