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

(-)a/Koha/Account/Line.pm (-9 / +12 lines)
Lines 597-603 sub apply { Link Here
597
            # Attempt to renew the item associated with this debit if
597
            # Attempt to renew the item associated with this debit if
598
            # appropriate
598
            # appropriate
599
            if ($debit->renewable) {
599
            if ($debit->renewable) {
600
                $debit->renew_item($params->{interface});
600
                $debit->renew_item(
601
                    { interface => $params->{interface}, credit => $self } );
601
            }
602
            }
602
603
603
            # Same logic exists in Koha::Account::pay
604
            # Same logic exists in Koha::Account::pay
Lines 929-943 sub renew_item { Link Here
929
    # - There is an interface param passed and it's value is 'opac'
930
    # - There is an interface param passed and it's value is 'opac'
930
931
931
    if (
932
    if (
932
        !C4::Context->preference('RenewAccruingItemWhenPaid') ||
933
        !$self->item ||
934
        !$self->patron ||
935
        (
933
        (
936
            !C4::Context->preference('RenewAccruingItemInOpac') &&
934
            exists $params->{credit}
937
            $params->{interface} &&
935
            && $params->{credit}->credit_type_code eq 'FORGIVEN'
938
            $params->{interface} eq 'opac'
939
        )
936
        )
940
    ) {
937
        || !C4::Context->preference('RenewAccruingItemWhenPaid')
938
        || !$self->item
939
        || !$self->patron
940
        || (   !C4::Context->preference('RenewAccruingItemInOpac')
941
            && $params->{interface}
942
            && $params->{interface} eq 'opac' )
943
      )
944
    {
941
        return;
945
        return;
942
    }
946
    }
943
947
944
- 

Return to bug 27927