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

(-)a/Koha/Account.pm (-2 / +2 lines)
Lines 203-211 sub pay { Link Here
203
        # If we need to make a note of the item associated with this line,
203
        # If we need to make a note of the item associated with this line,
204
        # in order that we can potentially renew it, do so.
204
        # in order that we can potentially renew it, do so.
205
        my $amt = $old_amountoutstanding - $amount_to_pay;
205
        my $amt = $old_amountoutstanding - $amount_to_pay;
206
        if ($fine->renewable) {
206
        if ( $fine->renewable ) {
207
            my $outcome = $fine->renew_item;
207
            my $outcome = $fine->renew_item;
208
            push @{$renew_outcomes}, $outcome;
208
            push @{$renew_outcomes}, $outcome if $outcome;
209
        }
209
        }
210
210
211
        if ( C4::Context->preference('MarkLostItemsAsReturned') =~ m|onpayment|
211
        if ( C4::Context->preference('MarkLostItemsAsReturned') =~ m|onpayment|
(-)a/Koha/Account/Line.pm (-9 / +5 lines)
Lines 901-907 sub renewable { Link Here
901
        $self->debit_type_code &&
901
        $self->debit_type_code &&
902
        $self->debit_type_code eq 'OVERDUE' &&
902
        $self->debit_type_code eq 'OVERDUE' &&
903
        $self->status &&
903
        $self->status &&
904
        $self->status eq 'UNRETURNED'
904
        $self->status eq 'UNRETURNED' &&
905
        $self->item &&
906
        $self->patron
905
    ) ? 1 : 0;
907
    ) ? 1 : 0;
906
}
908
}
907
909
Lines 919-937 sub renew_item { Link Here
919
921
920
    my $outcome = {};
922
    my $outcome = {};
921
923
922
    # We want to reject the call to renew if any of these apply:
924
    # We want to reject the call to renew if:
923
    # - The RenewAccruingItemWhenPaid syspref is off
925
    # - The RenewAccruingItemWhenPaid syspref is off
924
    # - The line item doesn't have an item attached to it
926
    # OR
925
    # - The line item doesn't have a patron attached to it
926
    #
927
    # - The RenewAccruingItemInOpac syspref is off
927
    # - The RenewAccruingItemInOpac syspref is off
928
    # AND
929
    # - There is an interface param passed and it's value is 'opac'
928
    # - There is an interface param passed and it's value is 'opac'
930
929
931
    if (
930
    if (
932
        !C4::Context->preference('RenewAccruingItemWhenPaid') ||
931
        !C4::Context->preference('RenewAccruingItemWhenPaid') ||
933
        !$self->item ||
934
        !$self->patron ||
935
        (
932
        (
936
            !C4::Context->preference('RenewAccruingItemInOpac') &&
933
            !C4::Context->preference('RenewAccruingItemInOpac') &&
937
            $params->{interface} &&
934
            $params->{interface} &&
938
- 

Return to bug 25508