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