From f00548af04f660a05d90d98aba9111628c630f1a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 6 Jun 2014 12:53:53 +0200 Subject: [PATCH] Bug 12164: follow-up: various fixes This follow-up fixes issues raised on bug 12164 comment 17. 1/ The unreceived orders columns should only display "pending" orders 2/ Fix some typo from_budget_period_id vs budget_period_id vs to_budget_period_id --- admin/aqbudgetperiods.pl | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 8e89aba..cebc024 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -224,6 +224,7 @@ elsif ( $op eq 'close_form' ) { my $unreceived_orders = C4::Acquisition::SearchOrders( { budget_id => $budget->{budget_id}, + pending => 1, } ); $budget->{unreceived_orders} = $unreceived_orders; @@ -243,7 +244,6 @@ elsif ( $op eq 'close_form' ) { elsif ( $op eq 'close_confirmed' ) { my $to_budget_period_id = $input->param('to_budget_period_id'); - my $from_budget_period_id = $input->param('from_budget_period_id'); my $move_remaining_unspent = $input->param('move_remaining_unspent'); my $report = C4::Budgets::MoveOrders( { @@ -253,7 +253,7 @@ elsif ( $op eq 'close_confirmed' ) { } ); - my $from_budget_period = GetBudgetPeriod($from_budget_period_id); + my $from_budget_period = GetBudgetPeriod($budget_period_id); my $to_budget_period = GetBudgetPeriod($to_budget_period_id); $template->param( closed => 1, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt index ffb4c26..aaf41e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -98,7 +98,7 @@ })); $("#move_form").submit(function(){ var budget_from = "[% budget_period_description %]"; - var budget_to = $("#budget_period").find("option:selected").html(); + var budget_to = $("#to_budget_period_id").find("option:selected").html(); var alert_message = _("You have chosen to move all unreceived orders from '%s' to '%s'.").format(budget_from, budget_to); alert_message += _("\nThis action cannot be reversed. Do you wish to continue?"); return confirm ( alert_message ); @@ -396,7 +396,7 @@ There is no unreceived orders for this budget. Back [% ELSE %] -

Choose the funds you want to move unreceived orders:

+

The unreceived orders from the following funds will be moved

Fund list of budget [% budget_period_description %]: @@ -445,7 +445,7 @@ [% END %] [% ELSIF closed %] -

Report after moving unreceived orders from budget [% from_budget_period.budget_period_description %] ([% from_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates %]) to [% to_budget_period.budget_period_description %] ([% to_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates%])

+

Report after moving unreceived orders from budget [% from_budget_period.budget_period_description %] ([% from_budget_period.budget_period_startdate | $KohaDates %] - [% from_budget_period.budget_period_enddate | $KohaDates %]) to [% to_budget_period.budget_period_description %] ([% to_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates%])

-- 2.0.0.rc2