1 package Koha
::Exceptions
::Account
;
3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 3 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with Koha; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 use Exception
::Class
(
22 'Koha::Exceptions::Account' => {
23 description
=> 'Something went wrong!',
25 'Koha::Exceptions::Account::IsNotCredit' => {
26 isa
=> 'Koha::Exceptions::Account',
27 description
=> 'Account line is not a credit'
29 'Koha::Exceptions::Account::IsNotDebit' => {
30 isa
=> 'Koha::Exceptions::Account',
31 description
=> 'Account line is not a credit'
33 'Koha::Exceptions::Account::NoAvailableCredit' => {
34 isa
=> 'Koha::Exceptions::Account',
35 description
=> 'No outstanding credit'
41 Koha::Exceptions::Account - Base class for Account exceptions
45 =head2 Koha::Exceptions::Account
47 Generic Account exception
49 =head2 Koha::Exceptions::Account::IsNotCredit
51 Exception to be used when an action on an account line requires it to be a
54 =head2 Koha::Exceptions::Account::IsNotDebit
56 Exception to be used when an action on an account line requires it to be a
59 =head2 Koha::Exceptions::Account::NoAvailableCredit
61 Exception to be used when a credit has no amount outstanding and is required
62 to be applied to outstanding debits.