Lines 110-117
if ( $total_paid and $total_paid ne '0.00' ) {
Link Here
|
110 |
} else { |
110 |
} else { |
111 |
if ($individual) { |
111 |
if ($individual) { |
112 |
if ( $total_paid == $total_due ) { |
112 |
if ( $total_paid == $total_due ) { |
113 |
makepayment( $accountlines_id, $borrowernumber, $accountno, $total_paid, $user, |
113 |
my $line = Koha::Account::Lines->find($accountlines_id); |
114 |
$branch, $payment_note ); |
114 |
Koha::Account->new( { patron_id => $borrowernumber } )->pay( |
|
|
115 |
{ |
116 |
lines => [$line], |
117 |
amount => $total_paid, |
118 |
library_id => $branch, |
119 |
note => $payment_note |
120 |
} |
121 |
); |
115 |
} |
122 |
} |
116 |
else { |
123 |
else { |
117 |
my $line = Koha::Account::Lines->find($accountlines_id); |
124 |
my $line = Koha::Account::Lines->find($accountlines_id); |
Lines 134-141
if ( $total_paid and $total_paid ne '0.00' ) {
Link Here
|
134 |
} |
141 |
} |
135 |
my @acc = split /,/, $select; |
142 |
my @acc = split /,/, $select; |
136 |
my $note = $input->param('selected_accts_notes'); |
143 |
my $note = $input->param('selected_accts_notes'); |
137 |
recordpayment_selectaccts( $borrowernumber, $total_paid, \@acc, $note ); |
144 |
|
138 |
} else { |
145 |
my @lines = Koha::Account::Lines->search( |
|
|
146 |
{ |
147 |
borrowernumber => $borrowernumber, |
148 |
accountno => { 'IN' => \@acc }, |
149 |
}, |
150 |
{ order_by => 'date' } |
151 |
); |
152 |
|
153 |
return Koha::Account->new( |
154 |
{ |
155 |
patron_id => $borrowernumber, |
156 |
} |
157 |
)->pay( |
158 |
{ |
159 |
amount => $total_paid, |
160 |
lines => \@lines, |
161 |
note => $note, |
162 |
} |
163 |
); |
164 |
} |
165 |
else { |
139 |
my $note = $input->param('selected_accts_notes'); |
166 |
my $note = $input->param('selected_accts_notes'); |
140 |
Koha::Account->new( { patron_id => $borrowernumber } ) |
167 |
Koha::Account->new( { patron_id => $borrowernumber } ) |
141 |
->pay( { amount => $total_paid, note => $note } ); |
168 |
->pay( { amount => $total_paid, note => $note } ); |
142 |
- |
|
|