|
Lines 18-23
use Sip::Checksum qw(verify_cksum);
Link Here
|
| 18 |
use Data::Dumper; |
18 |
use Data::Dumper; |
| 19 |
use CGI; |
19 |
use CGI; |
| 20 |
use C4::Auth qw(&check_api_auth); |
20 |
use C4::Auth qw(&check_api_auth); |
|
|
21 |
use C4::Dates; |
| 21 |
|
22 |
|
| 22 |
use UNIVERSAL qw(can); # make sure this is *after* C4 modules. |
23 |
use UNIVERSAL qw(can); # make sure this is *after* C4 modules. |
| 23 |
|
24 |
|
|
Lines 545-551
sub handle_checkout {
Link Here
|
| 545 |
$resp .= add_field(FID_ITEM_ID, $item_id); |
546 |
$resp .= add_field(FID_ITEM_ID, $item_id); |
| 546 |
$resp .= add_field(FID_TITLE_ID, $item->title_id); |
547 |
$resp .= add_field(FID_TITLE_ID, $item->title_id); |
| 547 |
if ($item->due_date) { |
548 |
if ($item->due_date) { |
| 548 |
$resp .= add_field(FID_DUE_DATE, Sip::timestamp($item->due_date)); |
549 |
$resp .= add_field(FID_DUE_DATE, C4::Dates->new($item->due_date, 'iso')->output() ); |
| 549 |
} else { |
550 |
} else { |
| 550 |
$resp .= add_field(FID_DUE_DATE, q{}); |
551 |
$resp .= add_field(FID_DUE_DATE, q{}); |
| 551 |
} |
552 |
} |
|
Lines 988-994
sub handle_patron_info {
Link Here
|
| 988 |
|
989 |
|
| 989 |
# SIP 2.0 extensions used by Envisionware |
990 |
# SIP 2.0 extensions used by Envisionware |
| 990 |
# Other terminals will ignore unrecognized fields (unrecognized field identifiers) |
991 |
# Other terminals will ignore unrecognized fields (unrecognized field identifiers) |
| 991 |
$resp .= maybe_add(FID_PATRON_BIRTHDATE, $patron->birthdate); |
992 |
$resp .= maybe_add(FID_PATRON_BIRTHDATE, C4::Dates->new($patron->birthdate, 'iso')->output() ); |
| 992 |
$resp .= maybe_add(FID_PATRON_CLASS, $patron->ptype); |
993 |
$resp .= maybe_add(FID_PATRON_CLASS, $patron->ptype); |
| 993 |
|
994 |
|
| 994 |
# Custom protocol extension to report patron internet privileges |
995 |
# Custom protocol extension to report patron internet privileges |
|
Lines 1128-1140
sub handle_item_information {
Link Here
|
| 1128 |
$resp .= add_field(FID_HOLD_QUEUE_LEN, $i); |
1129 |
$resp .= add_field(FID_HOLD_QUEUE_LEN, $i); |
| 1129 |
} |
1130 |
} |
| 1130 |
if ($item->due_date) { |
1131 |
if ($item->due_date) { |
| 1131 |
$resp .= add_field(FID_DUE_DATE, Sip::timestamp($item->due_date)); |
1132 |
$resp .= add_field(FID_DUE_DATE, C4::Dates->new($item->due_date, 'iso')->output() ); |
| 1132 |
} |
1133 |
} |
| 1133 |
if (($i = $item->recall_date) != 0) { |
1134 |
if (($i = $item->recall_date) != 0) { |
| 1134 |
$resp .= add_field(FID_RECALL_DATE, Sip::timestamp($i)); |
1135 |
$resp .= add_field(FID_RECALL_DATE, C4::Dates->new($i, 'iso')->output() ); |
| 1135 |
} |
1136 |
} |
| 1136 |
if (($i = $item->hold_pickup_date) != 0) { |
1137 |
if (($i = $item->hold_pickup_date) != 0) { |
| 1137 |
$resp .= add_field(FID_HOLD_PICKUP_DATE, Sip::timestamp($i)); |
1138 |
$resp .= add_field(FID_HOLD_PICKUP_DATE, C4::Dates->new($i, 'iso')->output() ); |
| 1138 |
} |
1139 |
} |
| 1139 |
|
1140 |
|
| 1140 |
$resp .= maybe_add(FID_SCREEN_MSG, $item->screen_msg); |
1141 |
$resp .= maybe_add(FID_SCREEN_MSG, $item->screen_msg); |
|
Lines 1360-1366
sub handle_renew {
Link Here
|
| 1360 |
$resp .= add_field(FID_PATRON_ID, $patron->id); |
1361 |
$resp .= add_field(FID_PATRON_ID, $patron->id); |
| 1361 |
$resp .= add_field(FID_ITEM_ID, $item->id); |
1362 |
$resp .= add_field(FID_ITEM_ID, $item->id); |
| 1362 |
$resp .= add_field(FID_TITLE_ID, $item->title_id); |
1363 |
$resp .= add_field(FID_TITLE_ID, $item->title_id); |
| 1363 |
$resp .= add_field(FID_DUE_DATE, Sip::timestamp($item->due_date)); |
1364 |
$resp .= add_field(FID_DUE_DATE, C4::Dates->new($item->due_date, 'iso')->output() ); |
| 1364 |
if ($ils->supports('security inhibit')) { |
1365 |
if ($ils->supports('security inhibit')) { |
| 1365 |
$resp .= add_field(FID_SECURITY_INHIBIT, |
1366 |
$resp .= add_field(FID_SECURITY_INHIBIT, |
| 1366 |
$status->security_inhibit); |
1367 |
$status->security_inhibit); |
| 1367 |
- |
|
|