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...
Hi Séverine, can you detail what is the behavior you expect?
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.
(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.
Created attachment 95777 [details] [review] Bug 23927: Add tests
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
Created attachment 95815 [details] [review] Bug 23927: Add tests Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
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>
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>
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>
Works as expected, contains tests (which all pass) and passes QA scripts. Passing QA
Nice work! Pushed to master for 19.11.00