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

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to