Lines 2886-2893
sub AddRenewal {
Link Here
|
2886 |
my $patron = Koha::Patrons->find( $borrowernumber ) or return; # FIXME Should do more than just return |
2886 |
my $patron = Koha::Patrons->find( $borrowernumber ) or return; # FIXME Should do more than just return |
2887 |
my $patron_unblessed = $patron->unblessed; |
2887 |
my $patron_unblessed = $patron->unblessed; |
2888 |
|
2888 |
|
2889 |
my $library = Koha::Libraries->find( $branch ); |
2889 |
my $circ_library = Koha::Libraries->find( _GetCircControlBranch($item, $patron_unblessed) ); |
2890 |
|
|
|
2891 |
|
2890 |
|
2892 |
if ( C4::Context->preference('CalculateFinesOnReturn') && $issue->is_overdue ) { |
2891 |
if ( C4::Context->preference('CalculateFinesOnReturn') && $issue->is_overdue ) { |
2893 |
_CalculateAndUpdateFine( { issue => $issue, item => $item, borrower => $patron_unblessed } ); |
2892 |
_CalculateAndUpdateFine( { issue => $issue, item => $item, borrower => $patron_unblessed } ); |
Lines 2906-2916
sub AddRenewal {
Link Here
|
2906 |
$datedue = CalcDateDue($datedue, $itemtype, _GetCircControlBranch($item, $patron_unblessed), $patron_unblessed, 'is a renewal'); |
2905 |
$datedue = CalcDateDue($datedue, $itemtype, _GetCircControlBranch($item, $patron_unblessed), $patron_unblessed, 'is a renewal'); |
2907 |
} |
2906 |
} |
2908 |
|
2907 |
|
2909 |
|
|
|
2910 |
my $fees = Koha::Charges::Fees->new( |
2908 |
my $fees = Koha::Charges::Fees->new( |
2911 |
{ |
2909 |
{ |
2912 |
patron => $patron, |
2910 |
patron => $patron, |
2913 |
library => $library, |
2911 |
library => $circ_library, |
2914 |
item => $item_object, |
2912 |
item => $item_object, |
2915 |
to_date => dt_from_string( $datedue ), |
2913 |
to_date => dt_from_string( $datedue ), |
2916 |
} |
2914 |
} |