Bugzilla – Attachment 2042 Details for
Bug 4361
Expiry Not Flagged in Patron status response
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-4361-Return-Patron-Expired-to-Sip-Process.patch (text/plain), 2.77 KB, created by
Chris Cormack
on 2010-04-07 09:08:00 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-04-07 09:08:00 UTC
Size:
2.77 KB
patch
obsolete
>From 3929fa187793d23d4e183f8c1144a4e2757666ef Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Wed, 7 Apr 2010 09:28:45 +0100 >Subject: [PATCH] Bug 4361 Return Patron Expired to Sip Process >Content-Type: text/plain; charset="utf-8" > >Identify Patron Expiry so that it is returned in Patron Info Response >--- > C4/SIP/ILS/Patron.pm | 25 ++++++++++++++++++++----- > 1 files changed, 20 insertions(+), 5 deletions(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 386287b..2a73307 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -50,6 +50,15 @@ sub new { > my $flags = $kp->{flags}; # or warn "Warning: No flags from patron object for '$patron_id'"; > my $debarred = $kp->{debarred}; # 1 if ($kp->{flags}->{DBARRED}->{noissues}); > $debug and warn sprintf("Debarred = %s : ", ($debarred||'undef')) . Dumper(%{$kp->{flags}}); >+ my ($day, $month, $year) = (localtime)[3,4,5]; >+ my $today = sprintf '%04d-%02d-%02d', $year+1900, $month+1, $day; >+ my $expired = ($today gt $kp->{dateexpiry}) ? 1 : 0; >+ if ($expired) { >+ if ($kp->{opacnote} ) { >+ $kp->{opacnote} .= q{ }; >+ } >+ $kp->{opacnote} .= 'PATRON EXPIRED'; >+ } > my %ilspatron; > my $adr = $kp->{streetnumber} || ''; > my $address = $kp->{address} || ''; >@@ -74,10 +83,10 @@ sub new { > address => $adr, > home_phone => $kp->{phone}, > email_addr => $kp->{email}, >- charge_ok => ( !$debarred ), >- renew_ok => ( !$debarred ), >- recall_ok => ( !$debarred ), >- hold_ok => ( !$debarred ), >+ charge_ok => ( !$debarred && !$expired ), >+ renew_ok => ( !$debarred && !$expired ), >+ recall_ok => ( !$debarred && !$expired ), >+ hold_ok => ( !$debarred && !$expired ), > card_lost => ( $kp->{lost} || $kp->{gonenoaddress} || $flags->{LOST} ), > claims_returned => 0, > fines => $fines_amount, # GetMemberAccountRecords($kp->{borrowernumber}) >@@ -92,7 +101,8 @@ sub new { > fine_items => [], > recall_items => [], > unavail_holds => [], >- inet => ( !$debarred ), >+ inet => ( !$debarred && !$expired ), >+ expired => $expired, > ); > } > $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}"; >@@ -205,6 +215,11 @@ sub language { > return $self->{language} || '000'; # Unspecified > } > >+sub expired { >+ my $self = shift; >+ return $self->{expired}; >+} >+ > # > # remove the hold on item item_id from my hold queue. > # return true if I was holding the item, false otherwise. >-- >1.6.6.1 >
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 4361
: 2042