Lines 70-102
patron.
Link Here
|
70 |
|
70 |
|
71 |
=head1 FUNCTIONS |
71 |
=head1 FUNCTIONS |
72 |
|
72 |
|
73 |
=head2 recordpayment |
|
|
74 |
|
75 |
&recordpayment($borrowernumber, $payment, $sip_paytype, $note); |
76 |
|
77 |
Record payment by a patron. C<$borrowernumber> is the patron's |
78 |
borrower number. C<$payment> is a floating-point number, giving the |
79 |
amount that was paid. C<$sip_paytype> is an optional flag to indicate this |
80 |
payment was made over a SIP2 interface, rather than the staff client. The |
81 |
value passed is the SIP2 payment type value (message 37, characters 21-22) |
82 |
|
83 |
Amounts owed are paid off oldest first. That is, if the patron has a |
84 |
$1 fine from Feb. 1, another $1 fine from Mar. 1, and makes a payment |
85 |
of $1.50, then the oldest fine will be paid off in full, and $0.50 |
86 |
will be credited to the next one. |
87 |
|
88 |
=cut |
89 |
|
90 |
#' |
91 |
sub recordpayment { |
92 |
|
93 |
#here we update the account lines |
94 |
my ( $borrowernumber, $data, $sip_paytype, $payment_note ) = @_; |
95 |
|
96 |
return Koha::Account->new( { patron_id => $borrowernumber } ) |
97 |
->pay( { amount => $data, sip => $sip_paytype, note => $payment_note } ); |
98 |
} |
99 |
|
100 |
=head2 makepayment |
73 |
=head2 makepayment |
101 |
|
74 |
|
102 |
&makepayment($accountlines_id, $borrowernumber, $acctnumber, $amount, $branchcode); |
75 |
&makepayment($accountlines_id, $borrowernumber, $acctnumber, $amount, $branchcode); |
103 |
- |
|
|