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