View | Details | Raw Unified | Return to bug 8125
Collapse All | Expand All

(-)a/C4/SIP/ILS/Patron.pm (-4 / +19 lines)
Lines 59-71 sub new { Link Here
59
        $kp->{opacnote} .= 'PATRON EXPIRED';
59
        $kp->{opacnote} .= 'PATRON EXPIRED';
60
    }
60
    }
61
	my %ilspatron;
61
	my %ilspatron;
62
	my $adr     = $kp->{streetnumber} || '';
62
    my $adr     = _get_address($kp);
63
	my $address = $kp->{address}      || ''; 
64
    my $dob     = $kp->{dateofbirth};
63
    my $dob     = $kp->{dateofbirth};
65
    $dob and $dob =~ s/-//g;    # YYYYMMDD
64
    $dob and $dob =~ s/-//g;    # YYYYMMDD
66
    my $dexpiry     = $kp->{dateexpiry};
65
    my $dexpiry     = $kp->{dateexpiry};
67
    $dexpiry and $dexpiry =~ s/-//g;    # YYYYMMDD
66
    $dexpiry and $dexpiry =~ s/-//g;    # YYYYMMDD
68
	$adr .= ($adr && $address) ? " $address" : $address;
69
    my $fines_amount = $flags->{CHARGES}->{amount};
67
    my $fines_amount = $flags->{CHARGES}->{amount};
70
    $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
68
    $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
71
    {
69
    {
Lines 353-358 sub charge_denied { Link Here
353
    return "Please contact library staff";
351
    return "Please contact library staff";
354
}
352
}
355
353
354
sub _get_address {
355
    my $patron = shift;
356
357
    my $address = $patron->{streetnumber} || q{};
358
    for my $field (qw( roaddetails address address2 city state zipcode country))
359
    {
360
        next unless $patron->{$field};
361
        if ($address) {
362
            $address .= q{ };
363
            $address .= $patron->{$field};
364
        }
365
        else {
366
            $address .= $patron->{$field};
367
        }
368
    }
369
    return $address;
370
}
371
356
1;
372
1;
357
__END__
373
__END__
358
374
359
- 

Return to bug 8125