@@ -, +, @@ acquisitions onboarding tool followed by the acquisition home page being displayed. --- acqui/acqui-home.pl | 18 +++++++------- admin/aqbudgetperiods.pl | 4 +-- admin/aqbudgets.pl | 5 ++++ .../prog/en/includes/onboardinginclude2.inc | 29 +++++++++++++--------- .../prog/en/modules/admin/aqbudgets.tt | 2 +- 5 files changed, 34 insertions(+), 24 deletions(-) --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -66,6 +66,15 @@ my $totspent_active = 0; my $totordered_active = 0; my $totavail_active = 0; +my $budgets = GetBudgetPeriod(1); +if ($budgets > 0){ + my $stepfund = 2; + $template->param( stepfund => $stepfund ); +} else { + my $stepfund = 1; + $template->param( stepfund => $stepfund ); +} + my @budget_loop; foreach my $budget ( @{$budget_arr} ) { next unless (CanUserUseBudget($loggedinuser, $budget, $userflags)); @@ -107,15 +116,6 @@ foreach my $budget ( @{$budget_arr} ) { push @budget_loop, $budget; } -my $budgets = GetBudgetPeriod(); -if ($budgets > 0) { - my $stepfund = 2; - $template->param( stepfund => $stepfund ); -}else{ - my $stepfund = 1; - $template->param( stepfund => $stepfund ); -} - $template->param( type => 'intranet', loop_budget => \@budget_loop, --- a/admin/aqbudgetperiods.pl +++ a/admin/aqbudgetperiods.pl @@ -120,8 +120,8 @@ elsif ( $op eq 'add_validate' ) { } else { # ELSE ITS AN ADD my $budget_period_id=AddBudgetPeriod($budget_period_hashref); - my $step= $input->param( 'step' ); - $template->param( step => $step); + my $stepfund = $input->param( 'step' ); + $template->param( stepfund => $stepfund ); print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); exit; } --- a/admin/aqbudgets.pl +++ a/admin/aqbudgets.pl @@ -180,6 +180,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_FORM #---------------------- DEFAULT DISPLAY BELOW --------------------- + # called by default form, used to confirm deletion of data in DB } elsif ($op eq 'delete_confirm') { @@ -221,6 +222,10 @@ if ($op eq 'add_form') { $budget_hash->{budget_id} = AddBudget( $budget_hash ); ModBudgetUsers($budget_hash->{budget_id}, @budgetusersid); $budget_modified = 1; + + print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); + exit; + } my $set_owner_to_children = $input->param('set_owner_to_children'); --- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc @@ -25,14 +25,13 @@
    - [% IF ( budget_parent_id ) %] -
  1. - Fund parent: - [% budget_parent_name %] - [% budget_parent_id %] - [% budget_parent_name %] - -
  2. - [% END %] + [% budget_parent_id = 0 %] +
  3. + Fund parent: + [% budget_parent_name %] + [% budget_parent_id %] - [% budget_parent_name %] + +
  4. @@ -48,10 +47,16 @@
  5. -
    - Cancel - -
    + + + [% IF ( budget_id ) %] + + [% END %] + + +
    + Cancel +
    --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -453,7 +453,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") -[% IF op == 'add_form' && !error_not_authorised_to_modify %] +[% IF op == 'add_form' %]
    [% IF ( budget_id ) %]Modify[% ELSE %]Add[% END %] Fund --