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

(-)a/C4/ILSDI/Services.pm (-5 / +7 lines)
Lines 122-128 sub GetAvailability { Link Here
122
    foreach my $id ( split( / /, $cgi->param('id') ) ) {
122
    foreach my $id ( split( / /, $cgi->param('id') ) ) {
123
        if ( $cgi->param('id_type') eq "item" ) {
123
        if ( $cgi->param('id_type') eq "item" ) {
124
            my ( $biblionumber, $status, $msg, $location ) = _availability($id);
124
            my ( $biblionumber, $status, $msg, $location ) = _availability($id);
125
126
            $out .= "  <dlf:record>\n";
125
            $out .= "  <dlf:record>\n";
127
            $out .= "    <dlf:bibliographic id=\"" . ( $biblionumber || $id ) . "\" />\n";
126
            $out .= "    <dlf:bibliographic id=\"" . ( $biblionumber || $id ) . "\" />\n";
128
            $out .= "    <dlf:items>\n";
127
            $out .= "    <dlf:items>\n";
Lines 132-137 sub GetAvailability { Link Here
132
            $out .= "          <dlf:availabilitystatus>" . $status . "</dlf:availabilitystatus>\n";
131
            $out .= "          <dlf:availabilitystatus>" . $status . "</dlf:availabilitystatus>\n";
133
            if ($msg)      { $out .= "          <dlf:availabilitymsg>" . $msg . "</dlf:availabilitymsg>\n"; }
132
            if ($msg)      { $out .= "          <dlf:availabilitymsg>" . $msg . "</dlf:availabilitymsg>\n"; }
134
            if ($location) { $out .= "          <dlf:location>" . $location . "</dlf:location>\n"; }
133
            if ($location) { $out .= "          <dlf:location>" . $location . "</dlf:location>\n"; }
134
            if ($duedate)  { $out .= "          <dlf:dateavailable>" . $duedate . "</dlf:dateavailable>\n"; }
135
            $out .= "        </dlf:simpleavailability>\n";
135
            $out .= "        </dlf:simpleavailability>\n";
136
            $out .= "      </dlf:item>\n";
136
            $out .= "      </dlf:item>\n";
137
            $out .= "    </dlf:items>\n";
137
            $out .= "    </dlf:items>\n";
Lines 880-888 sub _availability { Link Here
880
880
881
    if ( $item->notforloan ) {
881
    if ( $item->notforloan ) {
882
        return ( $biblionumber, 'not available', 'Not for loan', $location );
882
        return ( $biblionumber, 'not available', 'Not for loan', $location );
883
    } elsif ( $item->onloan ) {
883
    } elsif ( $item->{'onloan'} ) {
884
        return ( $biblionumber, 'not available', 'Checked out', $location );
884
        return (
885
    } elsif ( $item->itemlost ) {
885
            $biblionumber, 'not available', 'Checked out',
886
            $location,     $item->{'onloan'}
887
        );
888
    } elsif ( $item->{'itemlost'} ) {
886
        return ( $biblionumber, 'not available', 'Item lost', $location );
889
        return ( $biblionumber, 'not available', 'Item lost', $location );
887
    } elsif ( $item->withdrawn ) {
890
    } elsif ( $item->withdrawn ) {
888
        return ( $biblionumber, 'not available', 'Item withdrawn', $location );
891
        return ( $biblionumber, 'not available', 'Item withdrawn', $location );
889
- 

Return to bug 12469