- if ($$suggestion_ref{"STATUS"}){
- $$suggestion_ref{"manageddate"}=C4::Dates->today;
- $$suggestion_ref{"managedby"}=C4::Context->userenv->{number};
- }
- if ( my $reason = $$suggestion_ref{"reason$tabcode"}){
- if ( $reason eq "other" ) {
- $reason = $$suggestion_ref{"other_reason$tabcode"};
- }
- $$suggestion_ref{'reason'}=$reason;
- }
- delete $$suggestion_ref{$_} foreach ("reason$tabcode", "other_reason$tabcode");
- foreach (keys %$suggestion_ref){
- delete $$suggestion_ref{$_} unless ($$suggestion_ref{$_});
- }
+ if ( my $reason = $$suggestion_ref{"reason$tabcode"}){
+ if ( $reason eq "other" ) {
+ $reason = $$suggestion_ref{"other_reason$tabcode"};
+ }
+ $suggestion_only->{reason}=$reason;
+ }
+