]> git.koha-community.org Git - koha.git/commit
Bug 29283: Don't attempt to cancel cancelled orders
authorNick Clemens <nick@bywatersolutions.com>
Wed, 20 Oct 2021 13:06:06 +0000 (13:06 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 11 Nov 2021 00:41:43 +0000 (14:41 -1000)
commit415ab33e0f48ab5c66287e8b477722daa7cf4378
treed90e4da9e9429b64be9dfad26de77523c6e996c2
parentc502ba9aa6c221ed61e8f4c7309e90ff1b52f68e
Bug 29283: Don't attempt to cancel cancelled orders

When deleting a basket we cancel all the contained orders - when a
basket contains an order that was previously cancelled this can cause
an error if the biblio was deleted

When picking the orders to cancel, we should limit our search
to those not already cancelled.

To test:
- have a basket with at least one order
- click "Cancel order and delete catalog record", confirm cancellation of order and deletion of bib
- click "Delete basket", confirm deletion
- get error "Cannot insert order: Mandatory parameter biblionumber is missing at /kohadevbox/koha/acqui/basket.pl line 136.
 at /usr/share/perl/5.28/Carp.pm line 289"
- apply patch
- restart
- delete the basket
- success!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9aa8470382a78558baadcfb13dc545410cc0e70f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
acqui/basket.pl