View | Details | Raw Unified | Return to bug 16757
Collapse All | Expand All

(-)a/C4/SIP/ILS.pm (-4 / +2 lines)
Lines 247-259 sub end_patron_session { Link Here
247
}
247
}
248
248
249
sub pay_fee {
249
sub pay_fee {
250
    my ($self, $patron_id, $patron_pwd, $fee_amt, $fee_type,
250
    my ($self, $patron_id, $patron_pwd, $fee_amt, $fee_type, $pay_type, $fee_id, $trans_id, $currency) = @_;
251
	$pay_type, $fee_id, $trans_id, $currency) = @_;
252
    my $trans;
251
    my $trans;
253
252
254
    $trans = C4::SIP::ILS::Transaction::FeePayment->new();
253
    $trans = C4::SIP::ILS::Transaction::FeePayment->new();
255
254
256
257
    $trans->transaction_id($trans_id);
255
    $trans->transaction_id($trans_id);
258
    my $patron;
256
    my $patron;
259
    $trans->patron($patron = C4::SIP::ILS::Patron->new($patron_id));
257
    $trans->patron($patron = C4::SIP::ILS::Patron->new($patron_id));
Lines 261-267 sub pay_fee { Link Here
261
        $trans->screen_msg('Invalid patron barcode.');
259
        $trans->screen_msg('Invalid patron barcode.');
262
        return $trans;
260
        return $trans;
263
    }
261
    }
264
    $trans->pay($patron->{borrowernumber},$fee_amt, $pay_type);
262
    $trans->pay($patron->{borrowernumber},$fee_amt, $pay_type, $fee_id);
265
    $trans->ok(1);
263
    $trans->ok(1);
266
264
267
    return $trans;
265
    return $trans;
(-)a/C4/SIP/ILS/Transaction/FeePayment.pm (-3 / +10 lines)
Lines 20-26 use strict; Link Here
20
# You should have received a copy of the GNU General Public License
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>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use C4::Accounts qw(recordpayment);
23
use C4::Accounts qw(recordpayment makepayment);
24
use parent qw(C4::SIP::ILS::Transaction);
24
use parent qw(C4::SIP::ILS::Transaction);
25
25
26
26
Lines 46-53 sub pay { Link Here
46
    my $borrowernumber = shift;
46
    my $borrowernumber = shift;
47
    my $amt            = shift;
47
    my $amt            = shift;
48
    my $type           = shift;
48
    my $type           = shift;
49
    my $fee_id         = shift;
50
49
    warn("RECORD:$borrowernumber::$amt");
51
    warn("RECORD:$borrowernumber::$amt");
50
    recordpayment( $borrowernumber, $amt,$type );
52
53
    if ($fee_id) {
54
        makepayment( $fee_id, $borrowernumber, undef, $amt );
55
    }
56
    else {
57
        recordpayment( $borrowernumber, $amt, $type );
58
    }
51
}
59
}
52
60
53
#sub DESTROY {
61
#sub DESTROY {
54
- 

Return to bug 16757