View | Details | Raw Unified | Return to bug 20912
Collapse All | Expand All

(-)a/C4/Circulation.pm (-4 / +2 lines)
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
        }
(-)a/t/db_dependent/Circulation/issue.t (-1 / +16 lines)
Lines 85-90 my $categorycode = $builder->build({ Link Here
85
        value => { enrolmentfee => undef }
85
        value => { enrolmentfee => undef }
86
    })->{categorycode};
86
    })->{categorycode};
87
87
88
# A default issuingrule should always be present
89
my $issuingrule = $builder->build(
90
    {
91
        source => 'Issuingrule',
92
        value  => {
93
            itemtype      => '*',
94
            categorycode  => '*',
95
            branchcode    => '*',
96
            lengthunit    => 'days',
97
            issuelength   => 0,
98
            renewalperiod => 0,
99
            renewalsallowed => 0
100
        }
101
    }
102
);
103
88
# Add Dates
104
# Add Dates
89
my $dt_today = dt_from_string;
105
my $dt_today = dt_from_string;
90
my $today    = output_pref(
106
my $today    = output_pref(
91
- 

Return to bug 20912