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 |
- |
|
|