Lines 2424-2435
sub _FixAccountForLostAndReturned {
Link Here
|
2424 |
: 0; |
2424 |
: 0; |
2425 |
|
2425 |
|
2426 |
if ( $total_to_refund > 0 ) { |
2426 |
if ( $total_to_refund > 0 ) { |
|
|
2427 |
my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; |
2427 |
my $account = Koha::Patrons->find( $accountline->borrowernumber )->account; |
2428 |
my $account = Koha::Patrons->find( $accountline->borrowernumber )->account; |
2428 |
$credit = $account->add_credit( |
2429 |
$credit = $account->add_credit( |
2429 |
{ |
2430 |
{ |
2430 |
amount => $total_to_refund, |
2431 |
amount => $total_to_refund, |
2431 |
description => 'Item Returned ' . $item_id, |
2432 |
description => 'Item Returned ' . $item_id, |
2432 |
type => 'lost_item_return' |
2433 |
type => 'lost_item_return', |
|
|
2434 |
library_id => $branchcode, |
2433 |
} |
2435 |
} |
2434 |
); |
2436 |
); |
2435 |
} |
2437 |
} |