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

(-)a/C4/Circulation.pm (-4 / +2 lines)
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
        }
(-)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