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

(-)a/C4/XSLT.pm (-5 / +2 lines)
Lines 232-238 sub buildKohaItemsNamespace { Link Here
232
        @items = grep { !$hi{$_->{itemnumber}} } @items;
232
        @items = grep { !$hi{$_->{itemnumber}} } @items;
233
    }
233
    }
234
    my $branches = GetBranches();
234
    my $branches = GetBranches();
235
    my $itemtypes = GetItemTypes();
236
    my $xml = '';
235
    my $xml = '';
237
    for my $item (@items) {
236
    for my $item (@items) {
238
        my $status;
237
        my $status;
Lines 240-252 sub buildKohaItemsNamespace { Link Here
240
        my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
239
        my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
241
240
242
	my ( $reservestatus, $reserveitem, undef ) = C4::Reserves::CheckReserves($item->{itemnumber});
241
	my ( $reservestatus, $reserveitem, undef ) = C4::Reserves::CheckReserves($item->{itemnumber});
243
242
        if ( $item->{notforloan_per_itemtype} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} || 
244
        if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} || 
245
             (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ 
243
             (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ 
246
            if ( $item->{notforloan} < 0) {
244
            if ( $item->{notforloan} < 0) {
247
                $status = "On order";
245
                $status = "On order";
248
            } 
246
            } 
249
            if ( $item->{itemnotforloan} > 0 || $item->{notforloan} > 0 || $itemtypes->{ $item->{itype} }->{notforloan} == 1 ) {
247
            if ( $item->{itemnotforloan} > 0 || ($item->{notforloan_per_itemtype} && $item->{notforloan_per_itemtype}) == 1 ) {
250
                $status = "reference";
248
                $status = "reference";
251
            }
249
            }
252
            if ($item->{onloan}) {
250
            if ($item->{onloan}) {
253
- 

Return to bug 7937