Bug 16011: $VERSION - Remove the $VERSION init
[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
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 3 of the License, or
13 # (at your option) any later version.
14 #
15 # Koha is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with Koha; if not, see <http://www.gnu.org/licenses>.
22
23 use C4::Accounts qw(recordpayment);
24 use parent qw(C4::SIP::ILS::Transaction);
25
26
27 our $debug   = 0;
28
29 my %fields = ();
30
31 sub new {
32     my $class = shift;
33     my $self  = $class->SUPER::new();
34
35     foreach ( keys %fields ) {
36         $self->{_permitted}->{$_} = $fields{$_};    # overlaying _permitted
37     }
38
39     @{$self}{ keys %fields } = values %fields;    # copying defaults into object
40     return bless $self, $class;
41 }
42
43 sub pay {
44     my $self           = shift;
45     my $borrowernumber = shift;
46     my $amt            = shift;
47     my $type           = shift;
48     warn("RECORD:$borrowernumber::$amt");
49     recordpayment( $borrowernumber, $amt,$type );
50 }
51
52 #sub DESTROY {
53 #}
54
55 1;
56 __END__
57