Bugzilla – Attachment 177551 Details for
Bug 39044
Fund dropdown not populated for order search on acqui-home
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39044: Pass budgets to template
Bug-39044-Pass-budgets-to-template.patch (text/plain), 1.74 KB, created by
Nick Clemens (kidclamp)
on 2025-02-05 19:00:26 UTC
(
hide
)
Description:
Bug 39044: Pass budgets to template
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-02-05 19:00:26 UTC
Size:
1.74 KB
patch
obsolete
>From d576b9428f24c1af5d89c75d6a35d982fe25aba6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 5 Feb 2025 18:58:10 +0000 >Subject: [PATCH] Bug 39044: Pass budgets to template > >This simply copies the fetch of budgets from the acqui/histsearch.pl script. > >We should in the future make this a template or other method to avoid code duplication, >but we should fix the functionality first. > >To test: >1 - Go to Acqusitions >2 - See the dropdown "Fund: All funds" in the order search section >3 - Click it >4 - Feel disappointed >5 - Apply patch and restart all >6 - Reload and click the dropdown >7 - Options! Feel warm and fuzzy >--- > acqui/acqui-home.pl | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index af1034d3093..b2cd9d8f2c1 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -129,9 +129,20 @@ $filters->{from_placed_on} = my $from_placed_on = dt_from_string; > $filters->{to_placed_on} = my $to_placed_on = dt_from_string; > $filters->{from_placed_on}->set_time_zone('floating')->subtract( years => 1 ); > >+my $budgetperiods = C4::Budgets::GetBudgetPeriods; >+my $bp_loop = $budgetperiods; >+for my $bp ( @{$budgetperiods} ) { >+ my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id}, undef, undef, 1 ); >+ for my $budget ( @{$hierarchy} ) { >+ $$budget{budget_display_name} = sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); >+ } >+ $$bp{hierarchy} = $hierarchy; >+} >+ > $template->param( > type => 'intranet', > loop_budget => \@budget_loop, >+ bp_loop => $bp_loop, > total => $total, > totspent => $totspent, > totordered => $totordered, >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39044
:
177551
|
177558
|
177640