Bugzilla – Attachment 27259 Details for
Bug 11633
Cannot use the override function AllowFineOverride on the Staff client because this stops the pay function working on the SelfCheck (SC) machines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Second patch ensuring Patron Info is returned correctly
0002-Bug-11633-Return-Correct-status-if-patron-blocked-by.patch (text/plain), 3.21 KB, created by
Colin Campbell
on 2014-04-17 15:43:45 UTC
(
hide
)
Description:
Second patch ensuring Patron Info is returned correctly
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2014-04-17 15:43:45 UTC
Size:
3.21 KB
patch
obsolete
>From 8a15cd36a4456821eb256ccc3c45da6eda6dd4b9 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 17 Apr 2014 16:07:20 +0100 >Subject: [PATCH 2/2] Bug 11633 Return Correct status if patron blocked by > fines > >If the patron has amassed charges that block borrowing, but we >allow staff override the information that the patron cannot >issue should be included the patron information response > >This patch sets the appropriate status fields in the patron object > >It restores the fee_limit member to the patron object >and calls a local subroutine to set it. > >This could be done more elegantly but that would require more >major refactoring of the rather messy initializer code >in ILS::Patron >--- > C4/SIP/ILS/Patron.pm | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 4ccd21b..d326f89 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -61,6 +61,8 @@ sub new { > $dexpiry and $dexpiry =~ s/-//g; # YYYYMMDD > my $fines_amount = $flags->{CHARGES}->{amount}; > $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0; >+ my $fee_limit = _fee_limit(); >+ my $fine_blocked = $fines_amount > $fee_limit; > { > no warnings; # any of these $kp->{fields} being concat'd could be undef > %ilspatron = ( >@@ -79,10 +81,10 @@ sub new { > address => $adr, > home_phone => $kp->{phone}, > email_addr => $kp->{email}, >- charge_ok => ( !$debarred && !$expired ), >- renew_ok => ( !$debarred && !$expired ), >- recall_ok => ( !$debarred && !$expired ), >- hold_ok => ( !$debarred && !$expired ), >+ charge_ok => ( !$debarred && !$expired && !$fine_blocked), >+ renew_ok => ( !$debarred && !$expired && !$fine_blocked), >+ recall_ok => ( !$debarred && !$expired && !$fine_blocked), >+ hold_ok => ( !$debarred && !$expired && !$fine_blocked), > card_lost => ( $kp->{lost} || $kp->{gonenoaddress} || $flags->{LOST} ), > claims_returned => 0, > fines => $fines_amount, # GetMemberAccountRecords($kp->{borrowernumber}) >@@ -99,6 +101,7 @@ sub new { > unavail_holds => [], > inet => ( !$debarred && !$expired ), > expired => $expired, >+ fee_limit => $fee_limit, > ); > } > $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}"; >@@ -146,7 +149,7 @@ my %fields = ( > card_lost => 0, # for patron_status[4] > recall_overdue => 0, > currency => 1, >-# fee_limit => 0, >+ fee_limit => 0, > screen_msg => 1, > print_line => 1, > too_many_charged => 0, # for patron_status[5] >@@ -331,9 +334,8 @@ sub inet_privileges { > return $self->{inet} ? 'Y' : 'N'; > } > >-sub fee_limit { >- my $self = shift; >- return C4::Context->preference("noissuescharge") || 5; >+sub _fee_limit { >+ return C4::Context->preference('noissuescharge') || 5; > } > > sub excessive_fees { >-- >1.9.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 11633
:
27258
|
27259
|
30731
|
30732
|
31099
|
31100