Bugzilla – Attachment 167727 Details for
Bug 28924
Allow checkout fine limit to be determined by patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28924: (QA follow-up): Don't define charge values as 0
Bug-28924-QA-follow-up-Dont-define-charge-values-a.patch (text/plain), 4.37 KB, created by
Matt Blenkinsop
on 2024-06-14 15:12:40 UTC
(
hide
)
Description:
Bug 28924: (QA follow-up): Don't define charge values as 0
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-06-14 15:12:40 UTC
Size:
4.37 KB
patch
obsolete
>From b82e142877c7de2a04282fb34b7206998af61861 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 14 Jun 2024 14:46:09 +0000 >Subject: [PATCH] Bug 28924: (QA follow-up): Don't define charge values as 0 > >--- > C4/Circulation.pm | 2 -- > Koha/Patron.pm | 14 ++++++-------- > circ/circulation.pl | 2 -- > 3 files changed, 6 insertions(+), 12 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index acd6a7df38..8735e953b8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -870,7 +870,6 @@ sub CanBookBeIssued { > > # Check the debt of this patrons guarantees > my $no_issues_charge_guarantees = $patron_borrowing_status->{NoIssuesChargeGuarantees}->{limit}; >- $no_issues_charge_guarantees = undef unless looks_like_number($no_issues_charge_guarantees); > if ( defined $no_issues_charge_guarantees ) { > if ( $patron_borrowing_status->{NoIssuesChargeGuarantees}->{overlimit} && !$inprocess && !$allowfineoverride ) { > $issuingimpossible{DEBT_GUARANTEES} = $patron_borrowing_status->{NoIssuesChargeGuarantees}->{charge}; >@@ -889,7 +888,6 @@ sub CanBookBeIssued { > > # Check the debt of this patrons guarantors *and* the guarantees of those guarantors > my $no_issues_charge_guarantors = $patron_borrowing_status->{NoIssuesChargeGuarantorsWithGuarantees}->{limit}; >- $no_issues_charge_guarantors = undef unless looks_like_number($no_issues_charge_guarantors); > if ( defined $no_issues_charge_guarantors ) { > if ( $patron_borrowing_status->{NoIssuesChargeGuarantorsWithGuarantees}->{overlimit} > && !$inprocess >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 9d96074ba4..69ce5282f7 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -2915,7 +2915,7 @@ If any blockers are found, these are returned in a hash > =cut > > sub can_borrow { >- my ( $self ) = @_; >+ my ($self) = @_; > > my $status = { can_borrow => 1 }; > >@@ -2947,17 +2947,15 @@ sub is_patron_inside_charge_limits { > my ( $self, $args ) = @_; > > my $borrowernumber = $args->{borrowernumber}; >- my $patron = $args->{patron} || Koha::Patrons->find( { borrowernumber => $borrowernumber } ); >+ my $patron = $self || Koha::Patrons->find( { borrowernumber => $borrowernumber } ); > my $patron_category = $patron->category; > my $patron_charge_limits = {}; > >- my $no_issues_charge = $patron_category->noissuescharge || C4::Context->preference('noissuescharge') || 0; >+ my $no_issues_charge = $patron_category->noissuescharge || C4::Context->preference('noissuescharge'); > my $no_issues_charge_guarantees = >- $patron_category->noissueschargeguarantees || C4::Context->preference('NoIssuesChargeGuarantees') || 0; >- my $no_issues_charge_guarantors_with_guarantees = >- $patron_category->noissueschargeguarantorswithguarantees >- || C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees') >- || 0; >+ $patron_category->noissueschargeguarantees || C4::Context->preference('NoIssuesChargeGuarantees'); >+ my $no_issues_charge_guarantors_with_guarantees = $patron_category->noissueschargeguarantorswithguarantees >+ || C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees'); > > my $non_issues_charges = $patron->account->non_issues_charges; > my $guarantees_non_issues_charges = 0; >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 74d21beaca..acabfa4d1d 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -614,7 +614,6 @@ if ( $patron ) { > if ($no_issues_charge_guarantors) { > if ( $patron_charge_limits->{NoIssuesChargeGuarantorsWithGuarantees}->{overlimit} ) { > $template->param( >- noissues => 1, > charges_guarantors_guarantees => $patron_charge_limits->{NoIssuesChargeGuarantorsWithGuarantees}->{charge} > ); > $noissues = 1 unless C4::Context->preference("allowfineoverride"); >@@ -622,7 +621,6 @@ if ( $patron ) { > } > > my $no_issues_charge_guarantees = $patron_charge_limits->{NoIssuesChargeGuarantees}->{limit}; >- $no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees ); > if ( defined $no_issues_charge_guarantees ) { > if ( $patron_charge_limits->{NoIssuesChargeGuarantees}->{overlimit} ) { > $template->param( >-- >2.39.3 (Apple Git-146)
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 28924
:
165870
|
165871
|
165872
|
165873
|
165874
|
165875
|
165876
|
166042
|
166043
|
166044
|
166045
|
166046
|
166047
|
166048
|
166171
|
166172
|
166173
|
166174
|
166175
|
166176
|
166177
|
167719
|
167720
|
167721
|
167722
|
167723
|
167724
|
167725
|
167726
|
167727
|
167728
|
167729
|
167730
|
167731
|
167732
|
167733
|
167734
|
167735
|
167736
|
167737
|
167738
|
167739
|
167740
|
168728
|
168729
|
168730
|
168731
|
168732
|
168733
|
168734
|
168735
|
168736
|
168737
|
168738
|
168984
|
168985
|
168986
|
168987
|
168988
|
168989
|
168990
|
168991
|
168992
|
168993
|
168994
|
168995
|
169177
|
169428