Bug 23927 - Duplicate a "Complete" order link the "New" one to the invoice
Summary: Duplicate a "Complete" order link the "New" one to the invoice
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 15184
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-30 15:38 UTC by Séverine Queune
Modified: 2021-06-14 21:28 UTC (History)
3 users (show)

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


Attachments
Bug 23927: Add tests (1.10 KB, patch)
2019-11-25 10:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23927: Do not copy invoiceid for a new duplicated order (1.20 KB, patch)
2019-11-25 10:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23927: Add tests (1.24 KB, patch)
2019-11-26 10:20 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 23927: Do not copy invoiceid for a new duplicated order (1.34 KB, patch)
2019-11-26 10:20 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 23927: Add tests (1.31 KB, patch)
2019-11-27 09:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23927: Do not copy invoiceid for a new duplicated order (1.41 KB, patch)
2019-11-27 09:15 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Séverine Queune 2019-10-30 15:38:48 UTC
To reproduce :
- receive an order, remember the amount of your invoice
- in a new basket, add an order "From exisitions orders (copy)"
- search your received order
- duplicate
- go to the bibliographic record "Acquisition details" tab : you can see the "New" order as the same invoice number as the original order
- go to the invoice : you can see the 2 orders are mentioned and added to the total amount

Sorry Jonathan I didn't catch that point when testing the new feature...
Comment 1 Jonathan Druart 2019-11-04 14:19:24 UTC
Hi Séverine, can you detail what is the behavior you expect?
Comment 2 Séverine Queune 2019-11-20 09:57:02 UTC
To me, as it's supposed to be a new order, status should be "NEW".
The fact we use an other order is just a way to ease the acquisition process (e.g dictionaries, references items or subscriptions we want to buy each year), so it should not have effect on the new order.
Comment 3 Katrin Fischer 2019-11-25 06:57:52 UTC
(In reply to Séverine Queune from comment #2)
> To me, as it's supposed to be a new order, status should be "NEW".
> The fact we use an other order is just a way to ease the acquisition process
> (e.g dictionaries, references items or subscriptions we want to buy each
> year), so it should not have effect on the new order.

+1

The status should be new and the datereceived and invoiceid etc. should be empty.
Comment 4 Jonathan Druart 2019-11-25 10:56:52 UTC
Created attachment 95777 [details] [review]
Bug 23927: Add tests
Comment 5 Jonathan Druart 2019-11-25 10:56:55 UTC
Created attachment 95778 [details] [review]
Bug 23927: Do not copy invoiceid for a new duplicated order

When an order is created from an existing one (duplication), then the
invoice should be set to null instead of retrieved.

Test plan:
- receive an order
- in a new basket, add an order "From exisitions orders (copy)"
- search your received order
- duplicate
- go to the bibliographic record "Acquisition details" tab
=> Without this patch you will see that the invoice is the same for the
two orders
=> With this patch the invoice for the new order is not set
Comment 6 Séverine Queune 2019-11-26 10:20:51 UTC
Created attachment 95815 [details] [review]
Bug 23927: Add tests

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 7 Séverine Queune 2019-11-26 10:20:54 UTC
Created attachment 95816 [details] [review]
Bug 23927: Do not copy invoiceid for a new duplicated order

When an order is created from an existing one (duplication), then the
invoice should be set to null instead of retrieved.

Test plan:
- receive an order
- in a new basket, add an order "From exisitions orders (copy)"
- search your received order
- duplicate
- go to the bibliographic record "Acquisition details" tab
=> Without this patch you will see that the invoice is the same for the
two orders
=> With this patch the invoice for the new order is not set

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 8 Martin Renvoize 2019-11-27 09:15:28 UTC
Created attachment 95844 [details] [review]
Bug 23927: Add tests

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2019-11-27 09:15:31 UTC
Created attachment 95845 [details] [review]
Bug 23927: Do not copy invoiceid for a new duplicated order

When an order is created from an existing one (duplication), then the
invoice should be set to null instead of retrieved.

Test plan:
- receive an order
- in a new basket, add an order "From exisitions orders (copy)"
- search your received order
- duplicate
- go to the bibliographic record "Acquisition details" tab
=> Without this patch you will see that the invoice is the same for the
two orders
=> With this patch the invoice for the new order is not set

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2019-11-27 09:17:51 UTC
Works as expected, contains tests (which all pass) and passes QA scripts.

Passing QA
Comment 11 Martin Renvoize 2019-11-27 09:18:42 UTC
Nice work!

Pushed to master for 19.11.00