|
Lines 3-18
package ILS::Transaction::FeePayment;
Link Here
|
| 3 |
use warnings; |
3 |
use warnings; |
| 4 |
use strict; |
4 |
use strict; |
| 5 |
|
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 ILS; |
| 25 |
use base qw(ILS::Transaction); |
| 26 |
|
| 6 |
use vars qw($VERSION @ISA $debug); |
27 |
use vars qw($VERSION @ISA $debug); |
| 7 |
|
28 |
|
| 8 |
BEGIN { |
29 |
our $debug = 0; |
| 9 |
$VERSION = 1.00; |
30 |
our $VERSION = 1.00; |
| 10 |
@ISA = qw(ILS::Transaction); |
31 |
|
| 11 |
$debug = 0; |
32 |
my %fields = (); |
|
|
33 |
|
| 34 |
sub new { |
| 35 |
my $class = shift; |
| 36 |
my $self = $class->SUPER::new(); |
| 37 |
|
| 38 |
foreach ( keys %fields ) { |
| 39 |
$self->{_permitted}->{$_} = $fields{$_}; # overlaying _permitted |
| 40 |
} |
| 41 |
|
| 42 |
@{$self}{ keys %fields } = values %fields; # copying defaults into object |
| 43 |
return bless $self, $class; |
| 12 |
} |
44 |
} |
| 13 |
|
45 |
|
| 14 |
use ILS; |
46 |
sub pay { |
| 15 |
use ILS::Transaction; |
47 |
my $self = shift; |
|
|
48 |
my $borrowernumber = shift; |
| 49 |
my $amt = shift; |
| 50 |
warn("RECORD:$borrowernumber::$amt"); |
| 51 |
recordpayment( $borrowernumber, $amt ); |
| 52 |
} |
| 53 |
|
| 54 |
#sub DESTROY { |
| 55 |
#} |
| 16 |
|
56 |
|
| 17 |
1; |
57 |
1; |
| 18 |
__END__ |
58 |
__END__ |