use C4::Koha;
use C4::Auth;
use C4::Debug;
+use Koha::Acquisition::Currencies;
my $input = new CGI;
#### $input
# IF PERIOD_ID IS DEFINED, GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);
my $count = GetPeriodsCount();
-my $cur = GetCurrency;
-$template->param( symbol => $cur->{symbol},
- currency => $cur->{currency}
+my $active_currency = Koha::Acquisition::Currencies->get_active;
+$template->param( symbol => $active_currency->symbol,
+ currency => $active_currency->currency,
);
$template->param( period_button_only => 1 ) if $count == 0;
my $borrower_id = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'};
my $borrower_branchcode = $template->{VARS}->{'USER_INFO'}->{'branchcode'};
-my $periods;
my $authcat = $input->param('authcat');
my $show_active = $input->param('show_active');
my $show_actual = $input->param('show_actual');
my $show_mine = $input->param('show_mine') ;
-my @hide_cols = $input->param('hide_cols');
+my @hide_cols = $input->multi_param('hide_cols');
if ( $budget_period_locked == 1 && not defined $show_actual ) {
$show_actual = 1;
my $budget_id = $input->param('budget_id');
my $op = $input->param("op");
-my $budget_branchcode;
-
my $budgets_ref = GetBudgetHierarchy( $budget_period_id, $show_mine?$template->{VARS}->{'USER_INFO'}->{'branchcode'}:'', $show_mine?$template->{VARS}->{'USER_INFO'}->{'borrowernumber'}:'' );
# build categories list
push( @category_list, 'MONTHS' );
push( @category_list, 'ITEMTYPES' );
push( @category_list, 'BRANCHES' );
-push( @category_list, $$_{'authcat'} ) foreach @$auth_cats_loop;
+push( @category_list, $_ ) foreach @$auth_cats_loop;
#reorder the list
@category_list = sort { $a cmp $b } @category_list;
});
my @budgets = @$budgets_ref;
-my $CGISort;
my @authvals;
my %labels;
-my @names = $input->param();
+my @names = $input->multi_param();
# ------------------------------------------------------------
if ( $op eq 'save' ) {
#get budgets
my %seen;
@buds = grep { !$seen{$_}++ } @buds;
@auth_values = grep { !$seen{$_}++ } @auth_values;
- my @budget_ids;
my @budget_lines;
foreach my $budget (@buds) {