Bugzilla – Attachment 182948 Details for
Bug 40066
Cannot add order to basket from the baskets view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40066: Restore budget check to booksellers.pl
Bug-40066-Restore-budget-check-to-booksellerspl.patch (text/plain), 1.84 KB, created by
Jonathan Druart
on 2025-06-04 12:38:04 UTC
(
hide
)
Description:
Bug 40066: Restore budget check to booksellers.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-06-04 12:38:04 UTC
Size:
1.84 KB
patch
obsolete
>From 542b204a7d0ca793087ef4e83510f8a4fe80d85c Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Wed, 4 Jun 2025 10:16:46 +0100 >Subject: [PATCH] Bug 40066: Restore budget check to booksellers.pl > >Test plan: >1) Navigate to a vendor record and select the baskets view from the left menu >2) Click "add to basket" in the table >3) A modal will display requiring the user to define a budget and fund >4) Apply patch and restart_all >5) Repeat steps 1 and 2 >6) You will get the modal to add to the basket > >Signed-off-by: David Nind <david@davidnind.com> > >Amended-by: Jonathan Druart >Remove import of GetBudget > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > acqui/booksellers.pl | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl >index e4bcbaeaada..3efb73095c6 100755 >--- a/acqui/booksellers.pl >+++ b/acqui/booksellers.pl >@@ -45,6 +45,7 @@ use C4::Output qw( output_html_with_http_headers ); > use CGI qw ( -utf8 ); > > use C4::Acquisition qw( GetBasket GetBasketsInfosByBookseller CanUserManageBasket GetBasketgroup ); >+use C4::Budgets qw( GetBudgetHierarchy CanUserUseBudget ); > > use Koha::Acquisition::Booksellers; > use Koha::Patrons; >@@ -110,12 +111,22 @@ if ($booksellerid) { > basketcount => $vendor->baskets->count, > subscriptioncount => $vendor->subscriptions->count, > }; >+ >+} >+my $budgets = GetBudgetHierarchy; >+my $has_budgets = 0; >+foreach my $r ( @{$budgets} ) { >+ next unless ( CanUserUseBudget( $loggedinuser, $r, $userflags ) ); >+ >+ $has_budgets = 1; >+ last; > } > > $template->param( > loop_suppliers => $loop_suppliers, > booksellerid => $booksellerid, > count => $vendor ? 1 : 0, >+ has_budgets => $has_budgets, > ); > $template->{VARS}->{'allbaskets'} = $allbaskets; > >-- >2.34.1
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 40066
:
182933
|
182935
| 182948