Bugzilla – Attachment 42596 Details for
Bug 7560
SIP Self Checkout Ignoring Fines Thresholds for Not Being able to Check Out Books
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7560 - SIP Self Checkout Ignoring Fines Thresholds for Not Being able to Check Out Books - QA Followup
Bug-7560---SIP-Self-Checkout-Ignoring-Fines-Thresh.patch (text/plain), 2.72 KB, created by
Kyle M Hall (khall)
on 2015-09-16 14:04:26 UTC
(
hide
)
Description:
Bug 7560 - SIP Self Checkout Ignoring Fines Thresholds for Not Being able to Check Out Books - QA Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-09-16 14:04:26 UTC
Size:
2.72 KB
patch
obsolete
>From f4b4f5cbcd7f4c003cb0404d69963027fc439def Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 11 Mar 2013 13:29:31 -0400 >Subject: [PATCH] Bug 7560 - SIP Self Checkout Ignoring Fines Thresholds for Not Being able to Check Out Books - QA Followup > >--- > C4/Accounts.pm | 21 +++++++++++++++++++++ > C4/Overdues.pm | 19 ------------------- > C4/SIP/ILS/Transaction/Renew.pm | 2 +- > 3 files changed, 22 insertions(+), 20 deletions(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index 9ca87e3..d2fd5b5 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -49,6 +49,7 @@ BEGIN { > &makepartialpayment > &recordpayment_selectaccts > &WriteOffFee >+ &GetTotalFines > ); > } > >@@ -824,6 +825,26 @@ sub WriteOffFee { > > } > >+=head2 GetTotalFines >+ >+ my $total_fines_owed = GetTotalFines( $borrowernumber ); >+ >+ Returns the total amount owed by the given borrower. >+ >+=cut >+ >+sub GetTotalFines { >+ my ( $borrowernumber ) = @_; >+ my $dbh = C4::Context->dbh(); >+ my $query = "SELECT SUM( amountoutstanding ) AS total FROM accountlines WHERE borrowernumber = ?"; >+ my $sth = $dbh->prepare( $query ); >+ $sth->execute( $borrowernumber ); >+ my $row = $sth->fetchrow_hashref(); >+ my $total = $row->{'total'}; >+ $total = $total || 0; >+ return $total; >+} >+ > END { } # module clean-up code here (global destructor) > > 1; >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 03bcc85..eb30367 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -668,25 +668,6 @@ sub GetFine { > return 0; > } > >-=head2 GetTotalFines >- >- my $total_fines_owed = GetTotalFines( $borrowernumber ); >- >- Returns the total amount owed by the given borrower. >- >-=cut >- >-sub GetTotalFines { >- my ( $borrowernumber ) = @_; >- my $dbh = C4::Context->dbh(); >- my $query = "SELECT SUM( amountoutstanding ) AS total FROM accountlines WHERE borrowernumber = ?"; >- my $sth = $dbh->prepare( $query ); >- $sth->execute( $borrowernumber ); >- my $row = $sth->fetchrow_hashref(); >- my $total = $row->{'total'}; >- $total = $total || 0; >- return $total; >-} > > =head2 NumberNotifyId > >diff --git a/C4/SIP/ILS/Transaction/Renew.pm b/C4/SIP/ILS/Transaction/Renew.pm >index d909edb..66bdb6e 100644 >--- a/C4/SIP/ILS/Transaction/Renew.pm >+++ b/C4/SIP/ILS/Transaction/Renew.pm >@@ -46,7 +46,7 @@ sub do_renew_for { > > } > >- unless ( C4::Overdues::GetTotalFines($borrower->{borrowernumber}) < C4::Context->preference('OPACFineNoRenewals') ) { >+ unless ( C4::Accounts::GetTotalFines($borrower->{borrowernumber}) < C4::Context->preference('OPACFineNoRenewals') ) { > $renewokay = 0; > $renewerror = 'too_many_fines' > } >-- >1.7.2.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 7560
:
7772
|
11475
|
16044
|
16045
|
16047
|
16048
|
18194
|
18195
|
18196
|
18198
|
18199
|
18200
|
20004
|
20005
|
20006
|
42595
|
42596
|
42597
|
43587
|
43777
|
50398