From 08d98e858464d083ebec94e63ed551f69b325217 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 Signed-off-by: Paola Rossi Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- admin/aqbudgetperiods.pl | 4 ++-- .../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 68e47dbbe5..808f9cb4fe 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -229,6 +229,7 @@ elsif ( $op eq 'close_form' ) { my $unreceived_orders = C4::Acquisition::SearchOrders( { budget_id => $budget->{budget_id}, + pending => 1, } ); $budget->{unreceived_orders} = $unreceived_orders; @@ -248,7 +249,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( { @@ -258,7 +258,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 ffb4c26068..aaf41e1f2a 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.39.5