Bug 7904 Change SIP modules to use standard LIB path
[koha.git] / C4 / SIP / ILS / Transaction / FeePayment.pm
1 package C4::SIP::ILS::Transaction::FeePayment;
2
3 use warnings;
4 use strict;
5
6 # Copyright 2011 PTFS-Europe Ltd.
7 #
8 # This file is part of Koha.
9 #
10 # Koha is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
13 # version.
14 #
15 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License along
20 # with Koha; if not, write to the Free Software Foundation, Inc.,
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
23 use C4::Accounts qw(recordpayment);
24 use parent qw(C4::SIP::ILS::Transaction);
25
26
27 our $debug   = 0;
28 our $VERSION = 3.07.00.049;
29
30 my %fields = ();
31
32 sub new {
33     my $class = shift;
34     my $self  = $class->SUPER::new();
35
36     foreach ( keys %fields ) {
37         $self->{_permitted}->{$_} = $fields{$_};    # overlaying _permitted
38     }
39
40     @{$self}{ keys %fields } = values %fields;    # copying defaults into object
41     return bless $self, $class;
42 }
43
44 sub pay {
45     my $self           = shift;
46     my $borrowernumber = shift;
47     my $amt            = shift;
48     my $type           = shift;
49     warn("RECORD:$borrowernumber::$amt");
50     recordpayment( $borrowernumber, $amt,$type );
51 }
52
53 #sub DESTROY {
54 #}
55
56 1;
57 __END__
58