Bug 40066 - Cannot add order to basket from the baskets view
Summary: Cannot add order to basket from the baskets view
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on: 38010
Blocks:
  Show dependency treegraph
 
Reported: 2025-06-04 07:17 UTC by Jonathan Druart
Modified: 2025-06-04 22:08 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes adding items to a basket - instead of getting the pop-up window to add to the basket, the message "You can't create any orders unless you first define a budget and a fund." was shown (Acquisitions > [vendor] > Baskets > Add to basket). (This is related to Bug 38010 - Migrate vendors to Vue, added to Koha 25.05.)
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40066: Restore budget check to booksellers.pl (1.68 KB, patch)
2025-06-04 09:18 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40066: Restore budget check to booksellers.pl (1.72 KB, patch)
2025-06-04 10:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 40066: Restore budget check to booksellers.pl (1.84 KB, patch)
2025-06-04 12:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-06-04 07:17:51 UTC
http://localhost:8081/cgi-bin/koha/acqui/booksellers.pl?booksellerid=1

Click "add to basket"

=> "You can't create any orders unless you first define a budget and a fund."

This is caused by 
  commit e85ae2c02c84bba134eb2568afaa232c58a2b85b                                                           
  Bug 38010: (QA follow-up) Remove unnecessary code from booksellers.pl   

Which removes the TT var 'has_budgets' used by acquisitions-add-to-basket.inc
Comment 1 Matt Blenkinsop 2025-06-04 09:18:55 UTC
Created attachment 182933 [details] [review]
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
Comment 2 David Nind 2025-06-04 10:19:13 UTC
Created attachment 182935 [details] [review]
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>
Comment 3 Jonathan Druart 2025-06-04 12:38:04 UTC
Created attachment 182948 [details] [review]
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>
Comment 4 Lucas Gass (lukeg) 2025-06-04 22:08:47 UTC
Nice work everyone!

Pushed to main for 25.11