From 8e6b071b86fdfb654996b481c157a0c6bff3297c Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Fri, 18 May 2012 11:56:46 -0500 Subject: [PATCH] Bug 8125 - Adds zipcode to address output Content-Type: text/plain; charset="utf-8" Please test thoroughly - also, I don't know if there is a specific field that SIP expects zipcode to be in. If there is, this patch probably won't fix the issue. To test: fetch a valid patron using SIP. The Address field should have the zipcode included. --- C4/SIP/ILS/Patron.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 99fd6e7..a3c805b 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -61,11 +61,12 @@ sub new { my %ilspatron; my $adr = $kp->{streetnumber} || ''; my $address = $kp->{address} || ''; + my $zip = $kp->{zipcode} || ''; my $dob = $kp->{dateofbirth}; $dob and $dob =~ s/-//g; # YYYYMMDD my $dexpiry = $kp->{dateexpiry}; $dexpiry and $dexpiry =~ s/-//g; # YYYYMMDD - $adr .= ($adr && $address) ? " $address" : $address; + $adr .= ($adr && $address && $zip) ? " $address" : $address; my $fines_amount = $flags->{CHARGES}->{amount}; $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0; { -- 1.7.2.5