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

(-)a/C4/SIP/ILS.pm (-8 / +8 lines)
Lines 556-566 sub renew { Link Here
556
    # This is gross, but in a real ILS it would be better
556
    # This is gross, but in a real ILS it would be better
557
557
558
    # if (defined($title_id)) {
558
    # if (defined($title_id)) {
559
    #	foreach my $i (@{$patron->{items}}) {
559
    #    foreach my $i (@{$patron->{items}}) {
560
    #		$item = new ILS::Item $i;
560
    #        $item = new ILS::Item $i;
561
    #		last if ($title_id eq $item->title_id);
561
    #        last if ($title_id eq $item->title_id);
562
    #		$item = undef;
562
    #        $item = undef;
563
    #	}
563
    #    }
564
    # } else {
564
    # } else {
565
    my $j     = 0;
565
    my $j     = 0;
566
    my $count = scalar @{ $patron->{items} };
566
    my $count = scalar @{ $patron->{items} };
Lines 665-672 ILS - Portability layer to interface between Open-SIP and ILS Link Here
665
                            $currency);
665
                            $currency);
666
666
667
    $status = $ils->add_hold($patron_id, $patron_pwd, $item_id,
667
    $status = $ils->add_hold($patron_id, $patron_pwd, $item_id,
668
			     $title_id, $expiry_date,
668
                 $title_id, $expiry_date,
669
			     $pickup_locn, $hold_type, $fee_ack);
669
                 $pickup_locn, $hold_type, $fee_ack);
670
670
671
    $status = $ils->cancel_hold($patron_id, $patron_pwd,
671
    $status = $ils->cancel_hold($patron_id, $patron_pwd,
672
                                $item_id, $title_id);
672
                                $item_id, $title_id);
Lines 1019-1025 take. Link Here
1019
1019
1020
=item C<$fee_ack>
1020
=item C<$fee_ack>
1021
1021
1022
Boolean.  If true, the patron has acknowleged that she is willing
1022
Boolean.  If true, the patron has acknowledged that she is willing
1023
to pay the fee associated with placing a hold on this item.  If
1023
to pay the fee associated with placing a hold on this item.  If
1024
C<$fee_ack> is false, then the ILS should refuse to place the
1024
C<$fee_ack> is false, then the ILS should refuse to place the
1025
hold.
1025
hold.
(-)a/C4/SIP/ILS/Item.pm (-45 / +45 lines)
Lines 593-605 ILS::Item - Portable Item status object class for SIP Link Here
593
593
594
=head1 SYNOPSIS
594
=head1 SYNOPSIS
595
595
596
	use ILS;
596
    use ILS;
597
	use ILS::Item;
597
    use ILS::Item;
598
598
599
	# Look up item based on item_id
599
    # Look up item based on item_id
600
	my $item = new ILS::Item $item_id;
600
    my $item = new ILS::Item $item_id;
601
601
602
	# Basic object access methods
602
    # Basic object access methods
603
    $item_id    = $item->id;
603
    $item_id    = $item->id;
604
    $title      = $item->title_id;
604
    $title      = $item->title_id;
605
    $media_type = $item->sip_media_type;
605
    $media_type = $item->sip_media_type;
Lines 637-647 For the most part, C<ILS::Item>s are not operated on directly, Link Here
637
but are passed to C<ILS> methods as part of a transaction.  That
637
but are passed to C<ILS> methods as part of a transaction.  That
638
is, rather than having an item check itself in:
638
is, rather than having an item check itself in:
639
639
640
	$item->checkin;
640
    $item->checkin;
641
641
642
the code tells the ILS that the item has returned:
642
the code tells the ILS that the item has returned:
643
643
644
	$ils->checkin($item_id);
644
    $ils->checkin($item_id);
645
645
646
Similarly, patron's don't check things out (a la,
646
Similarly, patron's don't check things out (a la,
647
C<$patron-E<gt>checkout($item)>), but the ILS checks items out to
647
C<$patron-E<gt>checkout($item)>), but the ILS checks items out to
Lines 665-681 the item. Link Here
665
Return the SIP-defined media type of the item.  The specification
665
Return the SIP-defined media type of the item.  The specification
666
provides the following definitions:
666
provides the following definitions:
667
667
668
	000 Other
668
    000 Other
669
	001 Book
669
    001 Book
670
	002 Magazine
670
    002 Magazine
671
	003 Bound journal
671
    003 Bound journal
672
	004 Audio tape
672
    004 Audio tape
673
	005 Video tape
673
    005 Video tape
674
	006 CD/CDROM
674
    006 CD/CDROM
675
	007 Diskette
675
    007 Diskette
676
	008 Book with diskette
676
    008 Book with diskette
677
	009 Book with CD
677
    009 Book with CD
678
	010 Book with audio tape
678
    010 Book with audio tape
679
679
680
The SIP server does not use the media type code to alter its
680
The SIP server does not use the media type code to alter its
681
behavior at all; it merely passes it through to the self-service
681
behavior at all; it merely passes it through to the self-service
Lines 730-748 institution or library that owns the item." Link Here
730
Returns a two-character string describing the circulation status
730
Returns a two-character string describing the circulation status
731
of the item, as defined in the specification:
731
of the item, as defined in the specification:
732
732
733
	01 Other
733
    01 Other
734
	02 On order
734
    02 On order
735
	03 Available
735
    03 Available
736
	04 Charged
736
    04 Charged
737
	05 Charged; not to be recalled until earliest recall date
737
    05 Charged; not to be recalled until earliest recall date
738
	06 In process
738
    06 In process
739
	07 Recalled
739
    07 Recalled
740
	08 Waiting on hold shelf
740
    08 Waiting on hold shelf
741
	09 Waiting to be re-shelved
741
    09 Waiting to be re-shelved
742
	10 In transit between library locations
742
    10 In transit between library locations
743
	11 Claimed returned
743
    11 Claimed returned
744
	12 Lost
744
    12 Lost
745
	13 Missing
745
    13 Missing
746
746
747
=item C<$bool = $item-E<gt>available>
747
=item C<$bool = $item-E<gt>available>
748
748
Lines 767-773 hold on the item. Link Here
767
These functions all return the corresponding date as a standard
767
These functions all return the corresponding date as a standard
768
SIP-format timestamp:
768
SIP-format timestamp:
769
769
770
	YYYYMMDDZZZZHHMMSS
770
    YYYYMMDDZZZZHHMMSS
771
771
772
Where the C<'Z'> characters indicate spaces.
772
Where the C<'Z'> characters indicate spaces.
773
773
Lines 793-816 than one currency, however. Link Here
793
The type of fee being charged, as defined by the SIP protocol
793
The type of fee being charged, as defined by the SIP protocol
794
specification:
794
specification:
795
795
796
	01 Other/unknown
796
    01 Other/unknown
797
	02 Administrative
797
    02 Administrative
798
	03 Damage
798
    03 Damage
799
	04 Overdue
799
    04 Overdue
800
	05 Processing
800
    05 Processing
801
	06 Rental
801
    06 Rental
802
	07 Replacement
802
    07 Replacement
803
	08 Computer access charge
803
    08 Computer access charge
804
	09 Hold fee
804
    09 Hold fee
805
805
806
=item C<$mark = $item-E<gt>sip_security_marker>
806
=item C<$mark = $item-E<gt>sip_security_marker>
807
807
808
The type of security system with which the item is tagged:
808
The type of security system with which the item is tagged:
809
809
810
	00 Other
810
    00 Other
811
	01 None
811
    01 None
812
	02 3M Tattle-tape
812
    02 3M Tattle-tape
813
	03 3M Whisper tape
813
    03 3M Whisper tape
814
814
815
=item C<$msg = $item-E<gt>screen_msg>
815
=item C<$msg = $item-E<gt>screen_msg>
816
816
(-)a/C4/SIP/ILS/Patron.pm (-88 / +88 lines)
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.
(-)a/C4/Scrubber.pm (-2 / +1 lines)
Lines 38-44 my %scrubbertypes = ( Link Here
38
);
38
);
39
39
40
sub new {
40
sub new {
41
    shift;    # ignore our class we are wrapper
41
    shift;            # ignore our class we are wrapper
42
    my $type = (@_) ? shift : 'default';
42
    my $type = (@_) ? shift : 'default';
43
    if ( !exists $scrubbertypes{$type} ) {
43
    if ( !exists $scrubbertypes{$type} ) {
44
        croak "New called with unrecognized type '$type'";
44
        croak "New called with unrecognized type '$type'";
45
- 

Return to bug 39367