Add support for FID_PATRON_BIRTHDATE (PB) and FID_PATRON_CLASS
authordjfiander <djfiander>
Sun, 30 Apr 2006 00:15:04 +0000 (00:15 +0000)
committerdjfiander <djfiander>
Sun, 30 Apr 2006 00:15:04 +0000 (00:15 +0000)
(PC) to Patron Information Response, for Envisionware terminals.

Sip/Constants.pm
Sip/MsgType.pm

index 996e8a5..c517e1c 100644 (file)
@@ -304,6 +304,10 @@ use constant {
     FID_LOGIN_PWD              => 'CO',
     FID_LOCATION_CODE          => 'CP',
     FID_VALID_PATRON_PWD       => 'CQ',
+
+    # SIP Extensions used by Envisionware Terminals
+    FID_PATRON_BIRTHDATE       => 'PB',
+    FID_PATRON_CLASS           => 'PC',
 };
 
 # 
index 96bc265..f49b793 100644 (file)
@@ -924,6 +924,13 @@ sub handle_patron_info {
        $resp .= maybe_add(FID_HOME_PHONE, $patron->home_phone);
 
        $resp .= summary_info($patron, $summary, $start, $end);
+
+       # 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_BIRTHDATE, $patron->sip_birthdate);
+       $resp .= maybe_add(FID_PATRON_CLASS, $patron->ptype);
+
     } else {
        # Invalid patron ID, or password mismatch.  Either way
        # we don't give back any status information.