From d910cee85c30cd3981662fd8ae6483d3e4749e0e 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 Signed-off-by: Galen Charlton --- acqui/orderreceive.pl | 6 +++++- .../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 fa400a1020..2a21c14554 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -230,8 +230,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 0ffce9978b..cac2132604 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) %] -- 2.39.5