Bug 38343 - False display of closed invoices in receive process
Summary: False display of closed invoices in receive process
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords: regression, RM_priority
: 37475 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-11-04 13:44 UTC by Michaela Sieber
Modified: 2024-11-20 16:53 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38343: Do not show closed invoices by default when receiving (6.11 KB, patch)
2024-11-20 08:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38343: Do not show closed invoices by default when receiving (6.15 KB, patch)
2024-11-20 09:16 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 38343: (QA follow-up) Always show filters (1.73 KB, patch)
2024-11-20 15:13 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 38343: (QA follow-up) Improve tests and tidy (2.94 KB, patch)
2024-11-20 15:13 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 38343: Do not show closed invoices by default when receiving (6.22 KB, patch)
2024-11-20 15:16 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 38343: (QA follow-up) Always show filters (1.80 KB, patch)
2024-11-20 15:16 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 38343: (QA follow-up) Improve tests and tidy (3.01 KB, patch)
2024-11-20 15:16 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michaela Sieber 2024-11-04 13:44:14 UTC
acquisition module > bookseller > receive shipments

All closed invoices are displayed
Comment 1 Michaela Sieber 2024-11-07 17:44:21 UTC
When we receive an invoice from a vendor we don't want to see already closed invoices. Closed invoices means you can't receive orders anymore. So they have no value on the receive page.

Because of the list of all invoices (including the closed ones) of a vendor you always have to scroll down to enter the invoice number to create a new invoice.

To recreate step by step:

1.) go to acquisition module and search for a vendor
2.) click on button 'receive shipment'
3.) enter an invoice number and click 'next'
4.) click on button 'finish receiving'
5.) activate the checkbox 'close'
6.) click on button 'save'
7.) Check that your Invoice has been modified. The status is now "Closed on ..." and the checkbox is now 'Reopen' 
8.) Click on the link to the vendor to go the vendors page
9.) click on button 'receive shipment'
10.) Check that the closed invoice is displayed in the list above the section to receive a shipment where you can enter the invoice number.

Imagine now you have more than 20 closed invoices from this vendor.
The section to receive a shipment is then at the bottom of the page and you have to scroll down to enter an invoice number every time you get a new invoice from this vendor.
Comment 2 Katrin Fischer 2024-11-19 15:58:14 UTC
For a library using Koha for multiple years an many invoices this is a big issue. Updating severity.
Comment 3 Jonathan Druart 2024-11-20 08:22:49 UTC
Is this really a regression?
Comment 4 Jonathan Druart 2024-11-20 08:25:20 UTC
Created attachment 174818 [details] [review]
Bug 38343: Do not show closed invoices by default when receiving

Filter out closed invoices by default when receiving.

Test plan:
1.) go to acquisition module and search for a vendor
2.) click on button 'receive shipment'
3.) enter an invoice number and click 'next'
4.) click on button 'finish receiving'
5.) activate the checkbox 'close'
6.) click on button 'save'
7.) Check that your Invoice has been modified. The status is now "Closed on ..." and the checkbox is now 'Reopen'
8.) Click on the link to the vendor to go the vendors page
9.) click on button 'receive shipment'
=> The closed invoice is no longer displayed
Comment 5 Jonathan Druart 2024-11-20 08:25:32 UTC
I am not sure this is a regression, can you confirm?

Also, can you test and confirm that this patch is what you want?

I think there is a problem: if all invoices are closed we won't see the filters on the left and be able to select the new checkbox.
Comment 6 Jonathan Druart 2024-11-20 08:26:17 UTC
(In reply to Jonathan Druart from comment #4)
> Created attachment 174818 [details] [review] [review]
> Bug 38343: Do not show closed invoices by default when receiving
> 
> Filter out closed invoices by default when receiving.
> 
> Test plan:
> 1.) go to acquisition module and search for a vendor
> 2.) click on button 'receive shipment'
> 3.) enter an invoice number and click 'next'
> 4.) click on button 'finish receiving'
> 5.) activate the checkbox 'close'
> 6.) click on button 'save'
> 7.) Check that your Invoice has been modified. The status is now "Closed on
> ..." and the checkbox is now 'Reopen'
> 8.) Click on the link to the vendor to go the vendors page
> 9.) click on button 'receive shipment'
> => The closed invoice is no longer displayed

10.) Note the new "Include closed invoices" checkbox in the filters on the left of the screen, check it, filter
=> The closed invoice is now displayed.
Comment 7 PTFS Europe Sandboxes 2024-11-20 09:16:15 UTC
Created attachment 174820 [details] [review]
Bug 38343: Do not show closed invoices by default when receiving

Filter out closed invoices by default when receiving.

Test plan:
1.) go to acquisition module and search for a vendor
2.) click on button 'receive shipment'
3.) enter an invoice number and click 'next'
4.) click on button 'finish receiving'
5.) activate the checkbox 'close'
6.) click on button 'save'
7.) Check that your Invoice has been modified. The status is now "Closed on ..." and the checkbox is now 'Reopen'
8.) Click on the link to the vendor to go the vendors page
9.) click on button 'receive shipment'
=> The closed invoice is no longer displayed

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 8 Michaela Sieber 2024-11-20 09:17:40 UTC
I am not sure if this is a regression, but the patch works, so I signed off :-)
Comment 9 Katrin Fischer 2024-11-20 10:15:19 UTC
*** Bug 37475 has been marked as a duplicate of this bug. ***
Comment 10 Katrin Fischer 2024-11-20 10:50:14 UTC
I am pretty sure it worked like that in the beginning and it's documented like that in our internal documentation, but it's already not the case in 22.11.20. 
It could have been changed as part of a bug fix, then the version might not play that much of a role, but it's hard to tell without digging deeper.

As you can't receive for a closed invoice without reopening it first, the change does make a lot of sense anyway. Also thelist doesn't get polluted into "unusefulness" and slow performance.
Comment 11 Caroline Cyr La Rose 2024-11-20 14:42:03 UTC
I looked into a client's environment who uses acquisitions a lot and are in 23.05 and all invoices are displayed. I do think it's polluting (they have 912 invoices for one particular vendor!), but I worry they will think the invoices are lost if they just suddenly disappear. Could we just add something like for the baskets where the closed baskets are hidden, but there is a link to show closed baskets?
Comment 12 Emily Lamancusa (emlam) 2024-11-20 14:47:41 UTC
(In reply to Caroline Cyr La Rose from comment #11)
> I looked into a client's environment who uses acquisitions a lot and are in
> 23.05 and all invoices are displayed. I do think it's polluting (they have
> 912 invoices for one particular vendor!), but I worry they will think the
> invoices are lost if they just suddenly disappear. Could we just add
> something like for the baskets where the closed baskets are hidden, but
> there is a link to show closed baskets?

I had that thought too - I was actually about to upload a QA follow-up to show the filters (and thus, the "Include closed invoices" checkbox) even if there are no results. Do you think that will be clear enough, or is just having a checkbox at the bottom of the filters box too subtle?
Comment 13 Michaela Sieber 2024-11-20 15:02:20 UTC
(In reply to Emily Lamancusa (emlam) from comment #12)
> (In reply to Caroline Cyr La Rose from comment #11)
> > I looked into a client's environment who uses acquisitions a lot and are in
> > 23.05 and all invoices are displayed. I do think it's polluting (they have
> > 912 invoices for one particular vendor!), but I worry they will think the
> > invoices are lost if they just suddenly disappear. Could we just add
> > something like for the baskets where the closed baskets are hidden, but
> > there is a link to show closed baskets?
> 
> I had that thought too - I was actually about to upload a QA follow-up to
> show the filters (and thus, the "Include closed invoices" checkbox) even if
> there are no results. Do you think that will be clear enough, or is just
> having a checkbox at the bottom of the filters box too subtle?

I think that would be a nice enhancement Emily.

And we can add a text to the release notes to make sure that closed invoices can still be found on the vendors page or can be searched in the acquistion module (koha/acqui/invoices.pl)
Comment 14 Emily Lamancusa (emlam) 2024-11-20 15:13:51 UTC
Created attachment 174844 [details] [review]
Bug 38343: (QA follow-up) Always show filters

If a library is expecting to have open invoices and does not, they may
want to check the closed invoices. The option to include closed invoices
should be visible in that case - otherwise, it's several extra clicks to
back out into the Acquisitions module and search the invoices.
Comment 15 Emily Lamancusa (emlam) 2024-11-20 15:13:53 UTC
Created attachment 174845 [details] [review]
Bug 38343: (QA follow-up) Improve tests and tidy
Comment 16 Emily Lamancusa (emlam) 2024-11-20 15:16:43 UTC
Created attachment 174846 [details] [review]
Bug 38343: Do not show closed invoices by default when receiving

Filter out closed invoices by default when receiving.

Test plan:
1.) go to acquisition module and search for a vendor
2.) click on button 'receive shipment'
3.) enter an invoice number and click 'next'
4.) click on button 'finish receiving'
5.) activate the checkbox 'close'
6.) click on button 'save'
7.) Check that your Invoice has been modified. The status is now "Closed on ..." and the checkbox is now 'Reopen'
8.) Click on the link to the vendor to go the vendors page
9.) click on button 'receive shipment'
=> The closed invoice is no longer displayed

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 17 Emily Lamancusa (emlam) 2024-11-20 15:16:45 UTC
Created attachment 174847 [details] [review]
Bug 38343: (QA follow-up) Always show filters

If a library is expecting to have open invoices and does not, they may
want to check the closed invoices. The option to include closed invoices
should be visible in that case - otherwise, it's several extra clicks to
back out into the Acquisitions module and search the invoices.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 18 Emily Lamancusa (emlam) 2024-11-20 15:16:47 UTC
Created attachment 174848 [details] [review]
Bug 38343: (QA follow-up) Improve tests and tidy

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 19 Caroline Cyr La Rose 2024-11-20 16:12:00 UTC
Maybe I can open another bug for this and it can be done separately, but could we show something like "No open invoices" and a link "Show all invoices" like for the baskets? I feel like that is consistent with what we do elsewhere and it's clear where to get your invoices that you used to see https://snipboard.io/q2Jbsp.jpg
Comment 20 Marie-Luce Laflamme 2024-11-20 16:53:33 UTC
I agree with Caroline.
There are situations where reopening an invoice for adjustments might be necessary. For example, to process replacements for damaged items or missing copies in the order. In these cases, it seems logical to go directly to the receiving page, select the previous "closed" invoice and make the necessary adjustments.
Perhaps a 'Show All Invoices' link could be added to display hidden closed invoices when required. This would reduce unnecessary steps.