Bugzilla – Attachment 181468 Details for
Bug 39735
Typo in system preference call 'OPACFineNoRenewalsIncludeCredit'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39735: Fix typo in system preference call 'OPACFineNoRenewalsIncludeCredit'
Bug-39735-Fix-typo-in-system-preference-call-OPACF.patch (text/plain), 4.52 KB, created by
Roman Dolny
on 2025-04-24 19:31:31 UTC
(
hide
)
Description:
Bug 39735: Fix typo in system preference call 'OPACFineNoRenewalsIncludeCredit'
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2025-04-24 19:31:31 UTC
Size:
4.52 KB
patch
obsolete
>From c0c24e916a67ffc535e0775274ad0b980317e09e Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 24 Apr 2025 11:40:24 +0200 >Subject: [PATCH] Bug 39735: Fix typo in system preference call > 'OPACFineNoRenewalsIncludeCredit' > >Typo in system preference call 'OPACFineNoRenewalsIncludeCredit' >=> 'OPACFineNoRenewalsIncludeCredits' > >Test plan : >Run : prove t/db_dependent/Circulation.t >Run test plan of Bug 23293 > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > C4/Circulation.pm | 2 +- > opac/opac-user.pl | 2 +- > t/db_dependent/Circulation.t | 12 ++++++------ > 3 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 60dc4dc765..0a2f31deea 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -4875,7 +4875,7 @@ sub _CanBookBeAutoRenewed { > if ( C4::Context->preference('OPACFineNoRenewalsBlockAutoRenew') ) { > my $fine_no_renewals = C4::Context->preference("OPACFineNoRenewals"); > my $amountoutstanding = >- C4::Context->preference("OPACFineNoRenewalsIncludeCredit") >+ C4::Context->preference("OPACFineNoRenewalsIncludeCredits") > ? $patron->account->balance > : $patron->account->outstanding_debits->total_outstanding; > if ( $amountoutstanding and $amountoutstanding > $fine_no_renewals ) { >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index b841afd827..9d7109bcac 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -128,7 +128,7 @@ my $amountoutstanding = $patron->account->balance; > my $no_renewal_amt = C4::Context->preference('OPACFineNoRenewals'); > $no_renewal_amt = undef unless looks_like_number($no_renewal_amt); > my $amountoutstandingfornewal = >- C4::Context->preference("OPACFineNoRenewalsIncludeCredit") >+ C4::Context->preference("OPACFineNoRenewalsIncludeCredits") > ? $amountoutstanding > : $patron->account->outstanding_debits->total_outstanding; > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 4406b55a5a..670b618cde 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1322,7 +1322,7 @@ subtest "CanBookBeRenewed tests" => sub { > is( $error, 'auto_renew', 'Cannot renew, renew is automatic' ); > }; > >- subtest "auto_too_much_oweing | OPACFineNoRenewalsBlockAutoRenew & OPACFineNoRenewalsIncludeCredit" => sub { >+ subtest "auto_too_much_oweing | OPACFineNoRenewalsBlockAutoRenew & OPACFineNoRenewalsIncludeCredits" => sub { > plan tests => 10; > my $item_to_auto_renew = $builder->build_sample_item( > { >@@ -1351,7 +1351,7 @@ subtest "CanBookBeRenewed tests" => sub { > ); > C4::Context->set_preference( 'OPACFineNoRenewalsBlockAutoRenew', '1' ); > C4::Context->set_preference( 'OPACFineNoRenewals', '10' ); >- C4::Context->set_preference( 'OPACFineNoRenewalsIncludeCredit', '1' ); >+ C4::Context->set_preference( 'OPACFineNoRenewalsIncludeCredits', '1' ); > my $fines_amount = 5; > my $account = Koha::Account->new( { patron_id => $renewing_borrowernumber } ); > $account->add_debit( >@@ -1405,19 +1405,19 @@ subtest "CanBookBeRenewed tests" => sub { > is( $renewokay, 1, 'Renew, even if renewal is automatic' ); > is( > $error, 'auto_renew', >- 'Can auto renew, OPACFineNoRenewals=10, OPACFineNoRenewalsIncludeCredit=1, patron has 15 debt, 5 credit' >+ 'Can auto renew, OPACFineNoRenewals=10, OPACFineNoRenewalsIncludeCredits=1, patron has 15 debt, 5 credit' > ); > >- C4::Context->set_preference( 'OPACFineNoRenewalsIncludeCredit', '0' ); >+ C4::Context->set_preference( 'OPACFineNoRenewalsIncludeCredits', '0' ); > ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrower_obj, $issue ); > is( $renewokay, 0, 'Do not renew, renewal is automatic' ); > is( > $error, 'auto_too_much_oweing', >- 'Cannot auto renew, OPACFineNoRenewals=10, OPACFineNoRenewalsIncludeCredit=1, patron has 15 debt, 5 credit' >+ 'Cannot auto renew, OPACFineNoRenewals=10, OPACFineNoRenewalsIncludeCredits=1, patron has 15 debt, 5 credit' > ); > > $dbh->do( 'DELETE FROM accountlines WHERE borrowernumber=?', undef, $renewing_borrowernumber ); >- C4::Context->set_preference( 'OPACFineNoRenewalsIncludeCredit', '1' ); >+ C4::Context->set_preference( 'OPACFineNoRenewalsIncludeCredits', '1' ); > }; > > subtest "auto_account_expired | BlockExpiredPatronOpacActions" => sub { >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39735
:
181420
| 181468