|
Lines 937-998
and to display information about the patron's borrowing activity.
Link Here
|
| 937 |
|
937 |
|
| 938 |
=head1 SYNOPSIS |
938 |
=head1 SYNOPSIS |
| 939 |
|
939 |
|
| 940 |
use ILS; |
940 |
use ILS; |
| 941 |
use ILS::Patron; |
941 |
use ILS::Patron; |
| 942 |
|
942 |
|
| 943 |
# Look up patron based on patron_id |
943 |
# Look up patron based on patron_id |
| 944 |
my $patron = new ILS::Patron $patron_id |
944 |
my $patron = new ILS::Patron $patron_id |
| 945 |
|
945 |
|
| 946 |
# Basic object access methods |
946 |
# Basic object access methods |
| 947 |
$patron_id = $patron->id; |
947 |
$patron_id = $patron->id; |
| 948 |
$str = $patron->name; |
948 |
$str = $patron->name; |
| 949 |
$str = $patron->address; |
949 |
$str = $patron->address; |
| 950 |
$str = $patron->email_addr; |
950 |
$str = $patron->email_addr; |
| 951 |
$str = $patron->home_phone; |
951 |
$str = $patron->home_phone; |
| 952 |
$str = $patron->sip_birthdate; |
952 |
$str = $patron->sip_birthdate; |
| 953 |
$str = $patron->ptype; |
953 |
$str = $patron->ptype; |
| 954 |
$str = $patron->language; |
954 |
$str = $patron->language; |
| 955 |
$str = $patron->password; |
955 |
$str = $patron->password; |
| 956 |
$str = $patron->check_password($password); |
956 |
$str = $patron->check_password($password); |
| 957 |
$str = $patron->currency; |
957 |
$str = $patron->currency; |
| 958 |
$str = $patron->screen_msg; |
958 |
$str = $patron->screen_msg; |
| 959 |
$str = $patron->print_line; |
959 |
$str = $patron->print_line; |
| 960 |
|
960 |
|
| 961 |
# Check patron permissions |
961 |
# Check patron permissions |
| 962 |
$bool = $patron->charge_ok; |
962 |
$bool = $patron->charge_ok; |
| 963 |
$bool = $patron->renew_ok; |
963 |
$bool = $patron->renew_ok; |
| 964 |
$bool = $patron->recall_ok; |
964 |
$bool = $patron->recall_ok; |
| 965 |
$bool = $patron->hold_ok; |
965 |
$bool = $patron->hold_ok; |
| 966 |
$bool = $patron->card_lost; |
966 |
$bool = $patron->card_lost; |
| 967 |
$bool = $patron->too_many_charged; |
967 |
$bool = $patron->too_many_charged; |
| 968 |
$bool = $patron->too_many_overdue; |
968 |
$bool = $patron->too_many_overdue; |
| 969 |
$bool = $patron->too_many_renewal; |
969 |
$bool = $patron->too_many_renewal; |
| 970 |
$bool = $patron->too_many_claim_return; |
970 |
$bool = $patron->too_many_claim_return; |
| 971 |
$bool = $patron->too_many_lost( $server ); |
971 |
$bool = $patron->too_many_lost( $server ); |
| 972 |
$bool = $patron->excessive_fines; |
972 |
$bool = $patron->excessive_fines; |
| 973 |
$bool = $patron->excessive_fees; |
973 |
$bool = $patron->excessive_fees; |
| 974 |
$bool = $patron->too_many_billed; |
974 |
$bool = $patron->too_many_billed; |
| 975 |
|
975 |
|
| 976 |
# Patron borrowing activity |
976 |
# Patron borrowing activity |
| 977 |
$num = $patron->recall_overdue; |
977 |
$num = $patron->recall_overdue; |
| 978 |
$num = $patron->fee_amount; |
978 |
$num = $patron->fee_amount; |
| 979 |
$bool = $patron->drop_hold($item_id); |
979 |
$bool = $patron->drop_hold($item_id); |
| 980 |
@holds = $patron->hold_items($start, $end); |
980 |
@holds = $patron->hold_items($start, $end); |
| 981 |
@items = $patron->overdue_items($start, $end); |
981 |
@items = $patron->overdue_items($start, $end); |
| 982 |
@items = $patron->charged_items($start, $end); |
982 |
@items = $patron->charged_items($start, $end); |
| 983 |
@items = $patron->fine_items($start, $end); |
983 |
@items = $patron->fine_items($start, $end); |
| 984 |
@items = $patron->recall_items($start, $end); |
984 |
@items = $patron->recall_items($start, $end); |
| 985 |
@items = $patron->unavail_holds($start, $end); |
985 |
@items = $patron->unavail_holds($start, $end); |
| 986 |
|
986 |
|
| 987 |
# Changing a patron's status |
987 |
# Changing a patron's status |
| 988 |
$patron->block($card_retained, $blocked_msg); |
988 |
$patron->block($card_retained, $blocked_msg); |
| 989 |
$patron->enable; |
989 |
$patron->enable; |
| 990 |
|
990 |
|
| 991 |
=head1 INITIALIZATION |
991 |
=head1 INITIALIZATION |
| 992 |
|
992 |
|
| 993 |
A patron object is created by calling |
993 |
A patron object is created by calling |
| 994 |
|
994 |
|
| 995 |
$patron = new ILS::Patron $patron_id; |
995 |
$patron = new ILS::Patron $patron_id; |
| 996 |
|
996 |
|
| 997 |
where C<$patron_id> is the patron's barcode as received from the |
997 |
where C<$patron_id> is the patron's barcode as received from the |
| 998 |
self service terminal. If the patron barcode is not registered, |
998 |
self service terminal. If the patron barcode is not registered, |
|
Lines 1004-1017
The following functions return the corresponding information
Link Here
|
| 1004 |
about the given patron, or C<undef> if the information is |
1004 |
about the given patron, or C<undef> if the information is |
| 1005 |
unavailable. |
1005 |
unavailable. |
| 1006 |
|
1006 |
|
| 1007 |
$patron_id = $patron-E<gt>id; |
1007 |
$patron_id = $patron-E<gt>id; |
| 1008 |
$str = $patron-E<gt>name; |
1008 |
$str = $patron-E<gt>name; |
| 1009 |
$str = $patron-E<gt>address; |
1009 |
$str = $patron-E<gt>address; |
| 1010 |
$str = $patron-E<gt>email_addr; |
1010 |
$str = $patron-E<gt>email_addr; |
| 1011 |
$str = $patron-E<gt>home_phone; |
1011 |
$str = $patron-E<gt>home_phone; |
| 1012 |
|
1012 |
|
| 1013 |
$str = $patron-E<gt>screen_msg; |
1013 |
$str = $patron-E<gt>screen_msg; |
| 1014 |
$str = $patron-E<gt>print_line; |
1014 |
$str = $patron-E<gt>print_line; |
| 1015 |
|
1015 |
|
| 1016 |
If there are outstanding display messages associated with the |
1016 |
If there are outstanding display messages associated with the |
| 1017 |
patron, then these return the screen message and print line, |
1017 |
patron, then these return the screen message and print line, |
|
Lines 1025-1031
explication however.
Link Here
|
| 1025 |
Returns the patron's birthday formatted according to the SIP |
1025 |
Returns the patron's birthday formatted according to the SIP |
| 1026 |
specification: |
1026 |
specification: |
| 1027 |
|
1027 |
|
| 1028 |
YYYYMMDD HHMMSS |
1028 |
YYYYMMDD HHMMSS |
| 1029 |
|
1029 |
|
| 1030 |
=head2 C<$str = $patron-E<gt>ptype;> |
1030 |
=head2 C<$str = $patron-E<gt>ptype;> |
| 1031 |
|
1031 |
|
|
Lines 1043-1056
A three-digit string encoding the patron's preferred language.
Link Here
|
| 1043 |
The full list is defined in the SIP specification, but some of |
1043 |
The full list is defined in the SIP specification, but some of |
| 1044 |
the important values are: |
1044 |
the important values are: |
| 1045 |
|
1045 |
|
| 1046 |
000 Unknown (default) |
1046 |
000 Unknown (default) |
| 1047 |
001 English |
1047 |
001 English |
| 1048 |
002 French |
1048 |
002 French |
| 1049 |
008 Spanish |
1049 |
008 Spanish |
| 1050 |
011 Canadian French |
1050 |
011 Canadian French |
| 1051 |
016 Arabic |
1051 |
016 Arabic |
| 1052 |
019 Chinese |
1052 |
019 Chinese |
| 1053 |
021 North American Spanish |
1053 |
021 North American Spanish |
| 1054 |
|
1054 |
|
| 1055 |
=head2 C<$bool = $patron-E<gt>check_password($password);> |
1055 |
=head2 C<$bool = $patron-E<gt>check_password($password);> |
| 1056 |
|
1056 |
|
|
Lines 1066-1085
patron's preferred currency.
Link Here
|
| 1066 |
Most of the methods associated with Patrons are related to |
1066 |
Most of the methods associated with Patrons are related to |
| 1067 |
checking if they're authorized to perform various actions: |
1067 |
checking if they're authorized to perform various actions: |
| 1068 |
|
1068 |
|
| 1069 |
$bool = $patron-E<gt>charge_ok; |
1069 |
$bool = $patron-E<gt>charge_ok; |
| 1070 |
$bool = $patron-E<gt>renew_ok; |
1070 |
$bool = $patron-E<gt>renew_ok; |
| 1071 |
$bool = $patron-E<gt>recall_ok; |
1071 |
$bool = $patron-E<gt>recall_ok; |
| 1072 |
$bool = $patron-E<gt>hold_ok; |
1072 |
$bool = $patron-E<gt>hold_ok; |
| 1073 |
$bool = $patron-E<gt>card_lost; |
1073 |
$bool = $patron-E<gt>card_lost; |
| 1074 |
$bool = $patron-E<gt>recall_overdue; |
1074 |
$bool = $patron-E<gt>recall_overdue; |
| 1075 |
$bool = $patron-E<gt>too_many_charged; |
1075 |
$bool = $patron-E<gt>too_many_charged; |
| 1076 |
$bool = $patron-E<gt>too_many_overdue; |
1076 |
$bool = $patron-E<gt>too_many_overdue; |
| 1077 |
$bool = $patron-E<gt>too_many_renewal; |
1077 |
$bool = $patron-E<gt>too_many_renewal; |
| 1078 |
$bool = $patron-E<gt>too_many_claim_return; |
1078 |
$bool = $patron-E<gt>too_many_claim_return; |
| 1079 |
$bool = $patron-E<gt>too_many_lost( $server ); |
1079 |
$bool = $patron-E<gt>too_many_lost( $server ); |
| 1080 |
$bool = $patron-E<gt>excessive_fines; |
1080 |
$bool = $patron-E<gt>excessive_fines; |
| 1081 |
$bool = $patron-E<gt>excessive_fees; |
1081 |
$bool = $patron-E<gt>excessive_fees; |
| 1082 |
$bool = $patron-E<gt>too_many_billed; |
1082 |
$bool = $patron-E<gt>too_many_billed; |
| 1083 |
|
1083 |
|
| 1084 |
=head1 LISTS OF ITEMS ASSOCIATED WITH THE USER |
1084 |
=head1 LISTS OF ITEMS ASSOCIATED WITH THE USER |
| 1085 |
|
1085 |
|
|
Lines 1090-1106
and C<$end>, which define a subset of the list of items to be
Link Here
|
| 1090 |
returned (C<1> is the first item in the list). The following |
1090 |
returned (C<1> is the first item in the list). The following |
| 1091 |
methods all return a reference to a list of C<$item_id>s: |
1091 |
methods all return a reference to a list of C<$item_id>s: |
| 1092 |
|
1092 |
|
| 1093 |
$items = $patron-E<gt>hold_items($start, $end); |
1093 |
$items = $patron-E<gt>hold_items($start, $end); |
| 1094 |
$items = $patron-E<gt>overdue_items($start, $end); |
1094 |
$items = $patron-E<gt>overdue_items($start, $end); |
| 1095 |
$items = $patron-E<gt>charged_items($start, $end); |
1095 |
$items = $patron-E<gt>charged_items($start, $end); |
| 1096 |
$items = $patron-E<gt>recall_items($start, $end); |
1096 |
$items = $patron-E<gt>recall_items($start, $end); |
| 1097 |
$items = $patron-E<gt>unavail_holds($start, $end); |
1097 |
$items = $patron-E<gt>unavail_holds($start, $end); |
| 1098 |
|
1098 |
|
| 1099 |
It is also possible to retrieve an itemized list of the fines |
1099 |
It is also possible to retrieve an itemized list of the fines |
| 1100 |
outstanding. This method returns a reference to an itemized list |
1100 |
outstanding. This method returns a reference to an itemized list |
| 1101 |
of fines: |
1101 |
of fines: |
| 1102 |
|
1102 |
|
| 1103 |
$fines = $patron-E<gt>fine_items($start, $end); |
1103 |
$fines = $patron-E<gt>fine_items($start, $end); |
| 1104 |
|
1104 |
|
| 1105 |
=head1 PATRON BORROWING ACTIVITY |
1105 |
=head1 PATRON BORROWING ACTIVITY |
| 1106 |
|
1106 |
|
|
Lines 1132-1137
blocked, or C<undef> if the patron ID is not valid.
Link Here
|
| 1132 |
|
1132 |
|
| 1133 |
=head2 C<$patron-E<gt>enable;> |
1133 |
=head2 C<$patron-E<gt>enable;> |
| 1134 |
|
1134 |
|
| 1135 |
Reenable the patron after she's been blocked. This is a test |
1135 |
Re-enable the patron after she's been blocked. This is a test |
| 1136 |
function and will not normally be called by self-service |
1136 |
function and will not normally be called by self-service |
| 1137 |
terminals in production. |
1137 |
terminals in production. |