Patron Expiration in PA
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 31 Mar 2011 12:39:28 +0000 (08:39 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 31 Mar 2011 12:44:28 +0000 (08:44 -0400)
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
ILS/Patron.pm
ILS/Patron.pod
Sip/Constants.pm
Sip/MsgType.pm

index b36c820..991b1b8 100644 (file)
@@ -68,6 +68,7 @@ our %patron_db = (
                      recall_items => [],
                      unavail_holds => [],
                      inet => 1,
+                     expire => '20501231',
                  },
                  miker => {
                      name => "Mike Rylander",
@@ -97,6 +98,7 @@ our %patron_db = (
                      recall_items => [],
                      unavail_holds => [],
                      inet => 0,
+                     expire => '20501120',
                  },
                  );
 
@@ -155,6 +157,12 @@ sub sip_birthdate {
     return $self->{birthdate};
 }
 
+sub sip_expire {
+    my $self = shift;
+
+    return $self->{expire};
+}
+
 sub ptype {
     my $self = shift;
 
index 0b81866..82b9eaf 100644 (file)
@@ -42,6 +42,7 @@ and to display information about the patron's borrowing activity.
        $str = $patron->email_addr;
        $str = $patron->home_phone;
        $str = $patron->sip_birthdate;  
+       $str = $patron->sip_expire;
        $str = $patron->ptype;
        $str = $patron->language;
        $str = $patron->password;
@@ -119,6 +120,13 @@ specification:
 
        YYYYMMDD    HHMMSS
 
+=head2 C<$str = $patron-E<gt>sip_expire;>
+
+Returns the patron's expiration formated according to the SIP
+specification:
+
+       YYYYMMDD    HHMMSS
+
 =head2 C<$str = $patron-E<gt>ptype;>
 
 Returns the "patron type" of the patron.  This is not used by the
index bdfe341..b83517f 100644 (file)
@@ -248,6 +248,7 @@ use constant {
     FID_VALID_PATRON_PWD       => 'CQ',
 
     # SIP Extensions used by Envisionware Terminals
+    FID_PATRON_EXPIRE          => 'PA',
     FID_PATRON_BIRTHDATE       => 'PB',
     FID_PATRON_CLASS           => 'PC',
 
index e9176f9..2d828ff 100644 (file)
@@ -969,6 +969,7 @@ sub handle_patron_info {
         # SIP 2.0 extensions used by Envisionware
         # Other types of terminals will ignore the fields, if
         # they don't recognize the codes
+        $resp .= maybe_add(FID_PATRON_EXPIRE, $patron->sip_expire);
         $resp .= maybe_add(FID_PATRON_BIRTHDATE, $patron->sip_birthdate);
         $resp .= maybe_add(FID_PATRON_CLASS, $patron->ptype);