use Modern::Perl;
require Exporter;
use CGI qw ( -utf8 );
-use C4::Auth; # get_template_and_user
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
use C4::Suggestions;
-use C4::Koha;
-use C4::Budgets;
-use C4::Search;
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget );
+use C4::Search qw( FindDuplicate GetDistinctValues );
use C4::Members;
use Koha::DateUtils qw( dt_from_string );
use Koha::AuthorisedValues;
use Koha::Libraries;
use Koha::Patrons;
-use URI::Escape;
+use URI::Escape qw( uri_escape );
sub Init{
my $suggestion= shift @_;
$suggestion_only->{lastmodificationdate} = dt_from_string;
$suggestion_only->{lastmodificationby} = C4::Context->userenv->{number};
+ $suggestion_only->{branchcode} = undef
+ if exists $suggestion_only->{branchcode}
+ && $suggestion_only->{branchcode} eq "";
&ModSuggestion($suggestion_only);