|
Lines 108-114
sub pay {
Link Here
|
| 108 |
$fine->amountoutstanding($new_amountoutstanding)->store(); |
108 |
$fine->amountoutstanding($new_amountoutstanding)->store(); |
| 109 |
$balance_remaining = $balance_remaining - $amount_to_pay; |
109 |
$balance_remaining = $balance_remaining - $amount_to_pay; |
| 110 |
|
110 |
|
| 111 |
if ( $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) |
111 |
if ( $new_amountoutstanding == 0 && $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) |
| 112 |
{ |
112 |
{ |
| 113 |
C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); |
113 |
C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); |
| 114 |
} |
114 |
} |
|
Lines 164-169
sub pay {
Link Here
|
| 164 |
$fine->amountoutstanding( $old_amountoutstanding - $amount_to_pay ); |
164 |
$fine->amountoutstanding( $old_amountoutstanding - $amount_to_pay ); |
| 165 |
$fine->store(); |
165 |
$fine->store(); |
| 166 |
|
166 |
|
|
|
167 |
if ( $fine->amountoutstanding == 0 && $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) |
| 168 |
{ |
| 169 |
C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); |
| 170 |
} |
| 171 |
|
| 167 |
my $account_offset = Koha::Account::Offset->new( |
172 |
my $account_offset = Koha::Account::Offset->new( |
| 168 |
{ |
173 |
{ |
| 169 |
debit_id => $fine->id, |
174 |
debit_id => $fine->id, |
| 170 |
- |
|
|