Lines 2872-2879
sub AddRenewal {
Link Here
|
2872 |
my $patron = Koha::Patrons->find( $borrowernumber ) or return; # FIXME Should do more than just return |
2872 |
my $patron = Koha::Patrons->find( $borrowernumber ) or return; # FIXME Should do more than just return |
2873 |
my $patron_unblessed = $patron->unblessed; |
2873 |
my $patron_unblessed = $patron->unblessed; |
2874 |
|
2874 |
|
2875 |
my $library = Koha::Libraries->find( $branch ); |
2875 |
my $circ_library = Koha::Libraries->find( _GetCircControlBranch($item, $patron_unblessed) ); |
2876 |
|
|
|
2877 |
|
2876 |
|
2878 |
if ( C4::Context->preference('CalculateFinesOnReturn') && $issue->is_overdue ) { |
2877 |
if ( C4::Context->preference('CalculateFinesOnReturn') && $issue->is_overdue ) { |
2879 |
_CalculateAndUpdateFine( { issue => $issue, item => $item_unblessed, borrower => $patron_unblessed } ); |
2878 |
_CalculateAndUpdateFine( { issue => $issue, item => $item_unblessed, borrower => $patron_unblessed } ); |
Lines 2892-2902
sub AddRenewal {
Link Here
|
2892 |
$datedue = CalcDateDue($datedue, $itemtype, _GetCircControlBranch($item_unblessed, $patron_unblessed), $patron_unblessed, 'is a renewal'); |
2891 |
$datedue = CalcDateDue($datedue, $itemtype, _GetCircControlBranch($item_unblessed, $patron_unblessed), $patron_unblessed, 'is a renewal'); |
2893 |
} |
2892 |
} |
2894 |
|
2893 |
|
2895 |
|
|
|
2896 |
my $fees = Koha::Charges::Fees->new( |
2894 |
my $fees = Koha::Charges::Fees->new( |
2897 |
{ |
2895 |
{ |
2898 |
patron => $patron, |
2896 |
patron => $patron, |
2899 |
library => $library, |
2897 |
library => $circ_library, |
2900 |
item => $item_object, |
2898 |
item => $item_object, |
2901 |
to_date => dt_from_string( $datedue ), |
2899 |
to_date => dt_from_string( $datedue ), |
2902 |
} |
2900 |
} |