Lines 954-964
sub summary_info {
Link Here
|
954 |
{ func => $patron->can("fine_items"), fid => FID_FINE_ITEMS }, |
954 |
{ func => $patron->can("fine_items"), fid => FID_FINE_ITEMS }, |
955 |
{ func => $patron->can("recall_items"), fid => FID_RECALL_ITEMS }, |
955 |
{ func => $patron->can("recall_items"), fid => FID_RECALL_ITEMS }, |
956 |
{ func => $patron->can("unavail_holds"), fid => FID_UNAVAILABLE_HOLD_ITEMS }, |
956 |
{ func => $patron->can("unavail_holds"), fid => FID_UNAVAILABLE_HOLD_ITEMS }, |
|
|
957 |
{ func => $patron->can("fine_items"), fid => FID_FINE_ITEMS }, |
957 |
); |
958 |
); |
958 |
|
959 |
|
959 |
my $summary_type = index( $summary, 'Y' ); |
960 |
my $summary_type = index( $summary, 'Y' ); |
960 |
return q{} if $summary_type == -1; # No detailed information required. |
961 |
return q{} if $summary_type == -1; # No detailed information required. |
961 |
return q{} if $summary_type > 5; # Positions 6-9 are not defined in the sip spec, |
962 |
return q{} if $summary_type > 6; # Positions 7-9 are not defined in the sip spec, |
962 |
# and we have no extensions to handle them. |
963 |
# and we have no extensions to handle them. |
963 |
|
964 |
|
964 |
siplog( "LOG_DEBUG", "Summary_info: index == '%d', field '%s'", $summary_type, $summary_map[$summary_type]->{fid} ); |
965 |
siplog( "LOG_DEBUG", "Summary_info: index == '%d', field '%s'", $summary_type, $summary_map[$summary_type]->{fid} ); |
Lines 967-975
sub summary_info {
Link Here
|
967 |
my $fid = $summary_map[$summary_type]->{fid}; |
968 |
my $fid = $summary_map[$summary_type]->{fid}; |
968 |
my $itemlist = &$func( $patron, $start, $end, $server ); |
969 |
my $itemlist = &$func( $patron, $start, $end, $server ); |
969 |
|
970 |
|
970 |
siplog( "LOG_DEBUG", "summary_info: list = (%s)", join( ", ", map{ $_->{barcode} } @{$itemlist} ) ); |
971 |
# fine items use account_line as key |
971 |
foreach my $i ( @{$itemlist} ) { |
972 |
if ( $summary_type == 6 ) { |
972 |
$resp .= add_field( $fid, $i->{barcode}, $server ); |
973 |
siplog( "LOG_DEBUG", "summary_info: list = (%s)", join( ", ", map { $_->{account_line} } @{$itemlist} ) ); |
|
|
974 |
foreach my $i ( @{$itemlist} ) { |
975 |
$resp .= add_field( $fid, $i->{account_line}, $server ); |
976 |
} |
977 |
} |
978 |
else { |
979 |
siplog( "LOG_DEBUG", "summary_info: list = (%s)", join( ", ", map{ $_->{barcode} } @{$itemlist} ) ); |
980 |
foreach my $i ( @{$itemlist} ) { |
981 |
$resp .= add_field( $fid, $i->{barcode}, $server ); |
982 |
} |
973 |
} |
983 |
} |
974 |
|
984 |
|
975 |
return $resp; |
985 |
return $resp; |
976 |
- |
|
|