Bugzilla – Attachment 188339 Details for
Bug 23415
Notify patron fines when renewing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23415: (QA follow-up) Fix spelling: oweing -> owing
Bug-23415-QA-follow-up-Fix-spelling-oweing---owing.patch (text/plain), 14.89 KB, created by
Martin Renvoize (ashimema)
on 2025-10-23 11:25:36 UTC
(
hide
)
Description:
Bug 23415: (QA follow-up) Fix spelling: oweing -> owing
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-10-23 11:25:36 UTC
Size:
14.89 KB
patch
obsolete
>From 128ec6eb4eab2a397075ef010a021859abfc342e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Thu, 23 Oct 2025 11:50:27 +0100 >Subject: [PATCH] Bug 23415: (QA follow-up) Fix spelling: oweing -> owing > >Standardizes error code spelling across the codebase: >- Changes 'too_much_oweing' to 'too_much_owing' >- Changes 'auto_too_much_oweing' to 'auto_too_much_owing' > >The word "owing" is the correct spelling in English. > >Files updated: >- C4/Circulation.pm >- C4/SIP/Sip/MsgType.pm >- circ/renew.pl >- koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >- koha-tmpl/intranet-tmpl/prog/js/checkouts.js >- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >- misc/cronjobs/automatic_renewals.pl >- opac/opac-reserve.pl >- opac/opac-user.pl >- t/db_dependent/Circulation.t > >All tests pass successfully. >--- > C4/Circulation.pm | 6 +++--- > C4/SIP/Sip/MsgType.pm | 2 +- > circ/renew.pl | 2 +- > .../prog/en/modules/circ/renew.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 4 ++-- > .../bootstrap/en/modules/opac-reserve.tt | 4 ++-- > .../bootstrap/en/modules/opac-user.tt | 2 +- > misc/cronjobs/automatic_renewals.pl | 2 +- > opac/opac-reserve.pl | 2 +- > opac/opac-user.pl | 2 +- > t/db_dependent/Circulation.t | 20 +++++++++---------- > 11 files changed, 25 insertions(+), 25 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 85e5d6a1619..2865b54fc3c 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3210,7 +3210,7 @@ sub CanBookBeRenewed { > # extra notices being sent. Cron also implies no override > return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; > return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; >- return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; >+ return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_owing'; > > my $issuing_rule = Koha::CirculationRules->get_effective_rules( > { >@@ -3252,7 +3252,7 @@ sub CanBookBeRenewed { > { > return ( 0, 'overdue' ); > } elsif ( $finesblockrenewing && $balance > $finesblockrenewing ) { >- return ( 0, 'too_much_oweing' ); >+ return ( 0, 'too_much_owing' ); > } > > } >@@ -4994,7 +4994,7 @@ sub _CanBookBeAutoRenewed { > ? $patron->account->balance > : $patron->account->outstanding_debits->total_outstanding; > if ( $amountoutstanding and $amountoutstanding > $fine_no_renewals ) { >- return "auto_too_much_oweing"; >+ return "auto_too_much_owing"; > } > } > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 9f1cdd54602..c7c24d1ea0e 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -1253,7 +1253,7 @@ sub handle_fee_paid { > "auto_account_expired" => > "Scheduled for automatic renewal and cannot be renewed because the patron's account has expired", > "auto_renew" => "Scheduled for automatic renewal", >- "auto_too_much_oweing" => "Scheduled for automatic renewal", >+ "auto_too_much_owing" => "Scheduled for automatic renewal", > "on_reserve" => "On hold for another patron", > "patron_restricted" => "Patron is currently restricted", > "item_denied_renewal" => "Item is not allowed renewal", >diff --git a/circ/renew.pl b/circ/renew.pl >index ecbc33e105c..44ab1435fca 100755 >--- a/circ/renew.pl >+++ b/circ/renew.pl >@@ -95,7 +95,7 @@ if ( $op eq 'cud-renew' && $barcode ) { > ); > } > >- if ( $error && ( $error eq 'too_much_oweing' or $error eq 'auto_too_much_oweing' ) ) { >+ if ( $error && ( $error eq 'too_much_owing' or $error eq 'auto_too_much_owing' ) ) { > if ( $override_debt && C4::Context->preference("AllowFineOverrideRenewing") ) { > $can_renew = 1; > $error = undef; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >index 45593c5bc43..5da4ffd761e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >@@ -126,7 +126,7 @@ > <input type="submit" class="btn btn-default approve" value="Override and renew" /> > </form> > [% END %] >- [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %] >+ [% ELSIF error == "auto_renew" or error == "auto_too_much_owing" %] > <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal. </p> > [% SET override_limit = error == "auto_renew" ? "AUTO_RENEW" : "TOO_MUCH" %] > >@@ -139,7 +139,7 @@ > <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> Override limit and renew</button> > </form> > [% END %] >- [% ELSIF error == "too_much_oweing" %] >+ [% ELSIF error == "too_much_owing" %] > <li>The patron has a debt of [% balance | $Price %].</li> > [% IF Koha.Preference('AllowFineOverrideRenewing') %] > <form method="post" action="/cgi-bin/koha/circ/renew.pl"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index c6088f24b78..107541a2c99 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -437,7 +437,7 @@ function LoadIssuesTable() { > span_style = "display: none"; > span_class = "renewals-allowed"; > } else if ( >- oObj.can_renew_error == "auto_too_much_oweing" >+ oObj.can_renew_error == "auto_too_much_owing" > ) { > msg += > "<span class='renewals-disabled'>" + >@@ -472,7 +472,7 @@ function LoadIssuesTable() { > > span_style = "display: none"; > span_class = "renewals-allowed"; >- } else if (oObj.can_renew_error == "too_much_oweing") { >+ } else if (oObj.can_renew_error == "too_much_owing") { > msg += > "<span class='renewals-disabled'>" + > __( >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 363702f9262..c821eba5d8b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -59,8 +59,8 @@ > [% INCLUDE "patron-restrictions.inc" %] > [% END %] > >- [% IF ( too_much_oweing ) %] >- <li id="too_much_oweing"> You have unpaid fines. Amount: [% too_much_oweing | $Price %]. </li> >+ [% IF ( too_much_owing ) %] >+ <li id="too_much_owing"> You have unpaid fines. Amount: [% too_much_owing | $Price %]. </li> > [% END %] > > [% IF ( too_many_reserves ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 27d287c20b2..6534b4923a1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -451,7 +451,7 @@ > <span class="usr-msg no-renew-overdue">Not allowed <span class="renewals">(overdue)</span></span> > [% ELSIF ( ISSUE.auto_too_late ) %] > <span class="usr-msg no-renew-too-late">No longer renewable</span> >- [% ELSIF ISSUE.auto_too_much_oweing %] >+ [% ELSIF ISSUE.auto_too_much_owing %] > <span class="usr-msg auto-renew-fines">Automatic renewal failed, you have unpaid fines.</span> > <span class="renewals" > >( [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = ISSUE.renewsleft, renewals_allowed = ISSUE.renewsallowed }) %] >diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl >index faa3cdf43d0..0761c68b804 100755 >--- a/misc/cronjobs/automatic_renewals.pl >+++ b/misc/cronjobs/automatic_renewals.pl >@@ -243,7 +243,7 @@ sub _ProcessRenewals { > || $error eq 'too_unseen' > || $error eq 'auto_account_expired' > || $error eq 'auto_too_late' >- || $error eq 'auto_too_much_oweing' >+ || $error eq 'auto_too_much_owing' > || $error eq 'auto_too_soon' > || $error eq 'item_denied_renewal' > || $error eq 'item_issued_to_other_patron' >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index d35ae935f37..6be009e0d3f 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -125,7 +125,7 @@ if ( !$can_place_holds ) { > if ( $msg->message eq 'expired' ) { > $template->param( expired_patron => 1 ); > } elsif ( $msg->message eq 'debt_limit' ) { >- $template->param( too_much_oweing => sprintf( "%.02f", $msg->{payload}->{total_outstanding} ) ); >+ $template->param( too_much_owing => sprintf( "%.02f", $msg->{payload}->{total_outstanding} ) ); > } elsif ( $msg->message eq 'bad_address' ) { > $template->param( GNA => 1 ); > } elsif ( $msg->message eq 'card_lost' ) { >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 429374fa457..4b59548d0f1 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -258,7 +258,7 @@ if ( $pending_checkouts->count ) { # Useless test > $issue->{'auto_renew'} = 1 if $renewerror eq 'auto_renew'; > $issue->{'auto_too_soon'} = 1 if $renewerror eq 'auto_too_soon'; > $issue->{'auto_too_late'} = 1 if $renewerror eq 'auto_too_late'; >- $issue->{'auto_too_much_oweing'} = 1 if $renewerror eq 'auto_too_much_oweing'; >+ $issue->{'auto_too_much_owing'} = 1 if $renewerror eq 'auto_too_much_owing'; > $issue->{'item_denied_renewal'} = 1 if $renewerror eq 'item_denied_renewal'; > $issue->{'item_issued_to_other_patron'} = 1 if $renewerror eq 'item_issued_to_other_patron'; > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 8aef1fb44df..eff67f6cc81 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1325,7 +1325,7 @@ subtest "CanBookBeRenewed tests" => sub { > is( $error, 'auto_renew', 'Cannot renew, renew is automatic' ); > }; > >- subtest "auto_too_much_oweing | OPACFineNoRenewalsBlockAutoRenew & OPACFineNoRenewalsIncludeCredits" => sub { >+ subtest "auto_too_much_owing | OPACFineNoRenewalsBlockAutoRenew & OPACFineNoRenewalsIncludeCredits" => sub { > plan tests => 10; > my $item_to_auto_renew = $builder->build_sample_item( > { >@@ -1393,8 +1393,8 @@ subtest "CanBookBeRenewed tests" => sub { > } > )->status('RETURNED')->store; > ( $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, FineNoRenewals=10, patron has 15' ); >+ is( $renewokay, 0, 'Do not renew, renewal is automatic' ); >+ is( $error, 'auto_too_much_owing', 'Cannot auto renew, FineNoRenewals=10, patron has 15' ); > > $account->add_credit( > { >@@ -1415,7 +1415,7 @@ subtest "CanBookBeRenewed tests" => sub { > ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrower_obj, $issue ); > is( $renewokay, 0, 'Do not renew, renewal is automatic' ); > is( >- $error, 'auto_too_much_oweing', >+ $error, 'auto_too_much_owing', > 'Cannot auto renew, FineNoRenewals=10, OPACFineNoRenewalsIncludeCredits=1, patron has 15 debt, 5 credit' > ); > >@@ -1903,20 +1903,20 @@ subtest "CanBookBeRenewed tests" => sub { > # Too much debt > t::lib::Mocks::mock_preference( 'FineNoRenewals', 1 ); > ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrower_obj, $issue_1 ); >- is( $renewokay, 0, 'Cannot renew, too much debt and FineNoRenewals=1' ); >- is( $error, 'too_much_oweing', 'Cannot renew, debt not allowed (returned code is too_much_oweing)' ); >+ is( $renewokay, 0, 'Cannot renew, too much debt and FineNoRenewals=1' ); >+ is( $error, 'too_much_owing', 'Cannot renew, debt not allowed (returned code is too_much_owing)' ); > > # AllowFineOverrideRenewing should not affect CanBookBeRenewed behavior > # The preference only controls whether staff can override in the UI > t::lib::Mocks::mock_preference( 'AllowFineOverrideRenewing', 1 ); > ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrower_obj, $issue_1 ); >- is( $renewokay, 0, 'Cannot renew, too much debt even with AllowFineOverrideRenewing enabled' ); >- is( $error, 'too_much_oweing', 'Error code still too_much_oweing with AllowFineOverrideRenewing enabled' ); >+ is( $renewokay, 0, 'Cannot renew, too much debt even with AllowFineOverrideRenewing enabled' ); >+ is( $error, 'too_much_owing', 'Error code still too_much_owing with AllowFineOverrideRenewing enabled' ); > > t::lib::Mocks::mock_preference( 'AllowFineOverrideRenewing', 0 ); > ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrower_obj, $issue_1 ); >- is( $renewokay, 0, 'Cannot renew, too much debt with AllowFineOverrideRenewing disabled' ); >- is( $error, 'too_much_oweing', 'Error code still too_much_oweing with AllowFineOverrideRenewing disabled' ); >+ is( $renewokay, 0, 'Cannot renew, too much debt with AllowFineOverrideRenewing disabled' ); >+ is( $error, 'too_much_owing', 'Error code still too_much_owing with AllowFineOverrideRenewing disabled' ); > > C4::Context->dbh->do("DELETE FROM accountlines"); > }; >-- >2.51.0
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 23415
:
92039
|
92541
|
98442
|
98634
|
98996
|
98997
|
105893
|
105894
|
108392
|
109871
|
109872
|
109876
|
109880
|
116919
|
116920
|
116921
|
116922
|
118175
|
118176
|
118177
|
118178
|
118183
|
119300
|
119301
|
119302
|
119303
|
121472
|
139670
|
139671
|
139672
|
139673
|
139674
|
146415
|
148198
|
148199
|
148200
|
148201
|
148202
|
152776
|
152777
|
152778
|
152779
|
152780
|
152781
|
154595
|
154596
|
154597
|
154598
|
154599
|
154600
|
158302
|
158303
|
158304
|
158305
|
158306
|
158307
|
161964
|
161965
|
161966
|
161967
|
161968
|
161969
|
162171
|
162172
|
162173
|
162174
|
162175
|
162176
|
162177
|
162178
|
162179
|
162180
|
171620
|
171621
|
171622
|
171623
|
171983
|
171984
|
171985
|
171986
|
172906
|
172907
|
172908
|
172909
|
172910
|
185270
|
185271
|
185272
|
185273
|
185274
|
185275
|
186014
|
188331
|
188332
|
188333
|
188334
|
188335
|
188336
|
188337
|
188338
| 188339 |
188340
|
188341
|
188342