Koha-clms/Koha/Exceptions
Tomas Cohen Arazi ddf8dfcad0 Bug 26582: Add Koha::Acquisition::Basket->close
This patch adds two methods to Koha::Acquisition::Basket:
- 'closed': that tells if the basket is closed
- 'close': that closes the basket

It inherits the behaviour from CloseBasket (as it actually makes sense).
It improves CloseBasket by wrapping the action inside a transaction. It
uses the $orders->update call with no_trigger as there's no trigger to
trigger and the update can be done on a single DB call.

A new exceptions file is added for basket-related exceptions. The only
specific exception that gets added is
Koha::Exceptions::Acquisition::Basket::AlreadyClosed

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
..
Acquisition Bug 26582: Add Koha::Acquisition::Basket->close 2020-11-05 15:24:20 +01:00
Checkouts Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Patron Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Account.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Authentication.pm
…
Authorization.pm
…
ClubHold.pm Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
Config.pm
…
Elasticsearch.pm Bug 19893: Add code review fixes 2018-11-16 11:04:59 +00:00
Exception.pm Bug 21022: (follow-up) Move overloaded full_message method to subclass 2018-07-13 13:25:15 +00:00
Hold.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Ill.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Library.pm Bug 18072: Add Koha::Item->can_be_transferred 2018-07-18 17:29:04 +00:00
Metadata.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Object.pm Bug 25423: Add Koha::Exceptions::Object::NotInstantiated 2020-05-08 15:42:37 +02:00
Password.pm Bug 23816: (follow-up) Fix many things 2020-09-09 15:39:52 +02:00
Patron.pm Bug 21337: (QA follow-up) Rename exception code 2018-10-26 16:06:57 +00:00
Plugin.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Token.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00