From cad01e304e6f45f56436059ec367c8b0d814d7cf Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Tue, 13 Aug 2013 07:51:57 -0400 Subject: [PATCH] Bug 10403: Show inactive but unlocked budgets on orderreceive I have heard from several libraries that at the end of the budget year even though a budget is inactive for new acquisitions, an inactive budget should remain modifiable until the books are closed and the budget is marked inactive. This patch makes it so that all budgets that are unlocked are available on the order receipt page (only). Signed-off-by: Mathieu Saby Signed-off-by: Jonathan Druart --- acqui/orderreceive.pl | 6 +++++- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 833e402..4fb13ec 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -228,8 +228,12 @@ $template->param( my $borrower = GetMember( 'borrowernumber' => $loggedinuser ); my @budget_loop; -my $periods = GetBudgetPeriods( { 'budget_period_active' => 1 } ); +my $periods = GetBudgetPeriods( ); foreach my $period (@$periods) { + if ($period->{'budget_period_id'} == $budget->{'budget_period_id'}) { + $template->{'VARS'}->{'budget_period_description'} = $period->{'budget_period_description'}; + } + next if $period->{'budget_period_locked'} || !$period->{'budget_period_description'}; my $budget_hierarchy = GetBudgetHierarchy( $period->{'budget_period_id'} ); my @funds; foreach my $r ( @{$budget_hierarchy} ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 0ffce99..cac2132 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -266,7 +266,7 @@
  1. [% datereceived %]
  2. (Current: [% bookfund %])
  3. + +
  4. (Current: [% budget_period_description %] - [% bookfund %])
  5. [% IF ( memberfirstname and membersurname ) %][% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %][% ELSE %]No name[% END %]
  6. [% IF ( edit and not subscriptionid) %] -- 1.7.10.4