Bug 10390 - Add ability to delete unused invoices
Summary: Add ability to delete unused invoices
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jared Camins-Esakov
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-01 12:30 UTC by Jared Camins-Esakov
Modified: 2014-12-07 20:02 UTC (History)
2 users (show)

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


Attachments
Bug 10390: Add ability to delete empty invoices (5.97 KB, patch)
2013-06-02 18:25 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10390: Add ability to delete empty invoices (5.46 KB, patch)
2013-06-03 03:27 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
[PASSED QA] Bug 10390: Add ability to delete empty invoices (6.24 KB, patch)
2013-06-16 11:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2013-06-01 12:30:42 UTC
There is currently no way to delete unused invoices (for example, invoices created by mistake), and there really should be, since errors and absent-mindedness can result in numerous empty invoices over the course of years.
Comment 1 Jared Camins-Esakov 2013-06-02 18:25:44 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-06-03 03:27:15 UTC Comment hidden (obsolete)
Comment 3 Srdjan Jankovic 2013-06-03 03:31:11 UTC
It's not abig deal, it's empty invoices, but maybe making a delete button and separating Delete link a bit on the list page? Alternatively a confirm pop-up? Not fussed if the answer is no.
Comment 4 Jared Camins-Esakov 2013-06-03 11:56:16 UTC
(In reply to comment #3)
> It's not abig deal, it's empty invoices, but maybe making a delete button
> and separating Delete link a bit on the list page? Alternatively a confirm
> pop-up? Not fussed if the answer is no.

If you have any thoughts about how it would be best to do that, I'd be happy to make that change. The reason I did not do that initially is that I wanted to keep the user interface consistent and streamlined, and I was concerned that adding an entire additional step would make users' lives more difficult without really providing them with any protection.
Comment 5 Srdjan Jankovic 2013-06-04 00:12:45 UTC
Sure, that was just an idea, I'd actually go for adding an extra nbsp; or something before delete. But as I say, if you wish to leave it like it is now no big deal, I'll sign it off.
Comment 6 Katrin Fischer 2013-06-16 11:29:33 UTC
Created attachment 19036 [details] [review]
[PASSED QA] Bug 10390: Add ability to delete empty invoices

There is currently no way to delete unused invoices (for example,
invoices created by mistake), and there really should be, since errors
and absent-mindedness can result in numerous empty invoices over the
course of years.

To test:
1) Apply patch.
2) Create three invoices in the Acquisitions module. For one of them,
   receive at least one item. For the other two, do not receive any
   items.
3) View one of the invoices that does not have any items on it.
4) Try to delete it. This should succeed.
5) View the invoice that has an item. There should not be any option
   to delete it.
6) Do an invoice search that brings up the other invoice with no items
   on it. Try to delete it from the results page. This should succeed.
7) Run the unit test:
   > prove t/Acquisition/Invoice.t
8) Sign off.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass. I also did another test:

I cancelled all receipts from an existing invoice and then could
successfully delete it in the last step.
Comment 7 Galen Charlton 2013-07-05 17:03:27 UTC
Pushed to master.  Thanks, Jared!