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

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

Return to bug 20912