Bug 3969: Fix funds search
The funds search does not work at all. On the budget and the budget plan page, the library dropdown list is empty. Test plan: On the budget, the budget plan and the fund pages, confirm that you are able to search a fund by code (or name) and the library dropdown list is correctly filled. Tested with several combinations. Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Tested various combinations, no problems found. Passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
0dd8e0dbd0
commit
934de70eec
3 changed files with 12 additions and 13 deletions
|
@ -287,6 +287,8 @@ $url = "aqbudgetperiods.pl?tab=2";
|
|||
$url .= "&apage=$activepage" if($activepage != 1);
|
||||
my $inactive_pagination_bar = pagination_bar ($url, getnbpages( scalar(@$results), $inactivepagesize), $inactivepage, "ipage");
|
||||
|
||||
my $branchloop = C4::Branch::GetBranchesLoop();
|
||||
|
||||
my $tab = $input->param('tab') ? $input->param('tab') - 1 : 0;
|
||||
$template->param(
|
||||
period_active_loop => \@period_active_loop,
|
||||
|
@ -294,6 +296,7 @@ $template->param(
|
|||
active_pagination_bar => $active_pagination_bar,
|
||||
inactive_pagination_bar => $inactive_pagination_bar,
|
||||
tab => $tab,
|
||||
branchloop => $branchloop,
|
||||
);
|
||||
|
||||
$template->param($op=>1);
|
||||
|
|
|
@ -100,16 +100,7 @@ $template->param(
|
|||
|
||||
my $budget;
|
||||
|
||||
my $branches = GetBranches($show_mine);
|
||||
my @branchloop2;
|
||||
foreach my $thisbranch (keys %$branches) {
|
||||
my %row = (
|
||||
value => $thisbranch,
|
||||
branchname => $branches->{$thisbranch}->{'branchname'},
|
||||
);
|
||||
$row{selected} = 1 if $thisbranch eq $filter_budgetbranch;
|
||||
push @branchloop2, \%row;
|
||||
}
|
||||
my $branchloop = C4::Branch::GetBranchesLoop($filter_budgetbranch);
|
||||
|
||||
$template->param(auth_cats_loop => GetBudgetAuthCats( $budget_period_id ))
|
||||
if $budget_period_id;
|
||||
|
@ -284,6 +275,7 @@ if ( $op eq 'list' ) {
|
|||
|
||||
#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ?
|
||||
|
||||
my @budgets_to_display;
|
||||
foreach my $budget (@budgets) {
|
||||
# PERMISSIONS
|
||||
unless(CanUserModifyBudget($borrowernumber, $budget, $staffflags)) {
|
||||
|
@ -335,6 +327,7 @@ if ( $op eq 'list' ) {
|
|||
$budget->{budget_hierarchy} = \@budget_hierarchy;
|
||||
|
||||
$budget->{budget_has_children} = BudgetHasChildren( $budget->{budget_id} );
|
||||
push @budgets_to_display, $budget;
|
||||
}
|
||||
|
||||
my $budget_period_total = $period->{budget_period_total};
|
||||
|
@ -343,14 +336,15 @@ if ( $op eq 'list' ) {
|
|||
|
||||
$template->param(
|
||||
op => 'list',
|
||||
budgets => \@budgets,
|
||||
budgets => \@budgets_to_display,
|
||||
periods => $periods,
|
||||
budget_period_total => $budget_period_total,
|
||||
period_alloc_total => $period_alloc_total,
|
||||
spent_total => $spent_total,
|
||||
ordered_total => $ordered_total,
|
||||
available_total => $available_total,
|
||||
branchloop => \@branchloop2,
|
||||
branchloop => $branchloop,
|
||||
filter_budgetname => $filter_budgetname,
|
||||
);
|
||||
|
||||
} #---- END list
|
||||
|
|
|
@ -400,6 +400,7 @@ if ( $output eq "file" ) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
my $branchloop = C4::Branch::GetBranchesLoop();
|
||||
$template->param(
|
||||
authvals_row => \@authvals_row,
|
||||
budget_lines => \@budget_lines,
|
||||
|
@ -415,7 +416,8 @@ $template->param(
|
|||
CGIsepChoice => $CGIsepChoice,
|
||||
|
||||
authvals => \@authvals_row,
|
||||
hide_cols_loop => \@hide_cols
|
||||
hide_cols_loop => \@hide_cols,
|
||||
branchloop => $branchloop,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
Loading…
Reference in a new issue