Bug 40533

Summary: Clicking "Invoices" in vendor file doesn't show the vendor's invoices
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low Keywords: regression
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38010    
Bug Blocks:    

Description Caroline Cyr La Rose 2025-07-28 18:18:33 UTC
When I'm in a vendor file (http://localhost:8081/cgi-bin/koha/acquisition/vendors/1), and I click 'Invoices' in the left-hand side menu, I expect to see that vendor's invoices. Instead, I'm in the general invoices page and I need to click 'Search' at the bottom of the page to get that vendor's invoices.

This might be a side-effect of bug 38010, I'm not sure, but I tested on a local installation of 24.05.05 and when I click on Invoices from a vendor file, I immediately see the vendor's invoices, without having to scroll to the bottom and click 'Search'.

To recreate :
1. Create a basket, add an order, and close the basket
   1.1. Go to Acquisitions
   1.2. Search for "My Vendor"
   1.3. Click "1 basket(s)"
   1.4. Click "Add to basket"
   1.5. Click "From a new (empty) record"
   1.6. Enter a title
   1.7. Choose an item type in "y - Koha item type"
   1.8. Click "Add item"
   1.9. Choose a fund
   1.10. Enter a vendor price
   1.11. Click "Save"
   1.12. Click "Close basket"
   1.13. Click "Yes, close"

2. Create an invoice and receive the order
   2.1. Click "Receive shipments"
   2.2. Enter an invoice number
   2.3. Click "Next"
   2.4. Click "Receive" next to the order
   2.5. Check the box under "Receive?"
   2.6. Click "Confirm"
   2.7. Click "Finish receiving"

3. Go to the vendor file and try to view the list of invoices
   3.1. Go to Acquisitions home page
   3.2. Search for "My Vendor"
   3.3. Click "My Vendor (#1)"
   3.4. Click "Invoices" in the left-hand side menu
   --> The vendor's invoices are not displayed
   3.5. In the filters on the left side, notice the vendor "My vendor" is already selected (I'm not sure if this is because we only have one vendor, or because Koha know this is the vendor it's supposed to be searching for)
   3.6. Scroll to the bottom and click "Search"
   --> The invoice appears