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

(-)a/C4/Search.pm (+11 lines)
Lines 27-32 use XML::Simple; Link Here
27
use C4::Dates qw(format_date);
27
use C4::Dates qw(format_date);
28
use C4::XSLT;
28
use C4::XSLT;
29
use C4::Branch;
29
use C4::Branch;
30
use C4::Reserves;    # CheckReserves
30
use C4::Debug;
31
use C4::Debug;
31
use YAML;
32
use YAML;
32
use URI::Escape;
33
use URI::Escape;
Lines 1516-1521 sub searchResults { Link Here
1516
        my $itemdamaged_count     = 0;
1517
        my $itemdamaged_count     = 0;
1517
        my $item_in_transit_count = 0;
1518
        my $item_in_transit_count = 0;
1518
        my $can_place_holds       = 0;
1519
        my $can_place_holds       = 0;
1520
	my $item_onhold_count     = 0;
1519
        my $items_count           = scalar(@fields);
1521
        my $items_count           = scalar(@fields);
1520
        my $maxitems =
1522
        my $maxitems =
1521
          ( C4::Context->preference('maxItemsinSearchResults') )
1523
          ( C4::Context->preference('maxItemsinSearchResults') )
Lines 1573-1578 sub searchResults { Link Here
1573
                my $transfertwhen = '';
1575
                my $transfertwhen = '';
1574
                my ($transfertfrom, $transfertto);
1576
                my ($transfertfrom, $transfertto);
1575
1577
1578
                # is item on the reserve shelf?
1579
		my $reservestatus = 0;
1580
		my $reserveitem;
1581
1576
                unless ($item->{wthdrawn}
1582
                unless ($item->{wthdrawn}
1577
                        || $item->{itemlost}
1583
                        || $item->{itemlost}
1578
                        || $item->{damaged}
1584
                        || $item->{damaged}
Lines 1592-1597 sub searchResults { Link Here
1592
                    #        should map transit status to record indexed in Zebra.
1598
                    #        should map transit status to record indexed in Zebra.
1593
                    #
1599
                    #
1594
                    ($transfertwhen, $transfertfrom, $transfertto) = C4::Circulation::GetTransfers($item->{itemnumber});
1600
                    ($transfertwhen, $transfertfrom, $transfertto) = C4::Circulation::GetTransfers($item->{itemnumber});
1601
		    ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber});
1595
                }
1602
                }
1596
1603
1597
                # item is withdrawn, lost or damaged
1604
                # item is withdrawn, lost or damaged
Lines 1599-1610 sub searchResults { Link Here
1599
                    || $item->{itemlost}
1606
                    || $item->{itemlost}
1600
                    || $item->{damaged}
1607
                    || $item->{damaged}
1601
                    || $item->{notforloan}
1608
                    || $item->{notforloan}
1609
		    || $reservestatus eq 'Waiting'
1602
                    || ($transfertwhen ne ''))
1610
                    || ($transfertwhen ne ''))
1603
                {
1611
                {
1604
                    $wthdrawn_count++        if $item->{wthdrawn};
1612
                    $wthdrawn_count++        if $item->{wthdrawn};
1605
                    $itemlost_count++        if $item->{itemlost};
1613
                    $itemlost_count++        if $item->{itemlost};
1606
                    $itemdamaged_count++     if $item->{damaged};
1614
                    $itemdamaged_count++     if $item->{damaged};
1607
                    $item_in_transit_count++ if $transfertwhen ne '';
1615
                    $item_in_transit_count++ if $transfertwhen ne '';
1616
		    $item_onhold_count++     if $reservestatus eq 'Waiting';
1608
                    $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
1617
                    $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
1609
                    $other_count++;
1618
                    $other_count++;
1610
1619
Lines 1613-1618 sub searchResults { Link Here
1613
                    	$other_items->{$key}->{$_} = $item->{$_};
1622
                    	$other_items->{$key}->{$_} = $item->{$_};
1614
					}
1623
					}
1615
                    $other_items->{$key}->{intransit} = ($transfertwhen ne '') ? 1 : 0;
1624
                    $other_items->{$key}->{intransit} = ($transfertwhen ne '') ? 1 : 0;
1625
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
1616
					$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value;
1626
					$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value;
1617
					$other_items->{$key}->{count}++ if $item->{$hbranch};
1627
					$other_items->{$key}->{count}++ if $item->{$hbranch};
1618
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1628
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
Lines 1677-1682 sub searchResults { Link Here
1677
        $oldbiblio->{itemlostcount}        = $itemlost_count;
1687
        $oldbiblio->{itemlostcount}        = $itemlost_count;
1678
        $oldbiblio->{damagedcount}         = $itemdamaged_count;
1688
        $oldbiblio->{damagedcount}         = $itemdamaged_count;
1679
        $oldbiblio->{intransitcount}       = $item_in_transit_count;
1689
        $oldbiblio->{intransitcount}       = $item_in_transit_count;
1690
        $oldbiblio->{onholdcount}          = $item_onhold_count;
1680
        $oldbiblio->{orderedcount}         = $ordered_count;
1691
        $oldbiblio->{orderedcount}         = $ordered_count;
1681
        $oldbiblio->{isbn} =~
1692
        $oldbiblio->{isbn} =~
1682
          s/-//g;    # deleting - in isbn to enable amazon content
1693
          s/-//g;    # deleting - in isbn to enable amazon content
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl (+1 lines)
Lines 515-520 function GetZ3950Terms(){ Link Here
515
                                        <!-- TMPL_IF NAME="itemlost" -->(Lost)<!-- /TMPL_IF -->
515
                                        <!-- TMPL_IF NAME="itemlost" -->(Lost)<!-- /TMPL_IF -->
516
                                        <!-- TMPL_IF NAME="damaged" -->(Damaged)<!-- /TMPL_IF -->
516
                                        <!-- TMPL_IF NAME="damaged" -->(Damaged)<!-- /TMPL_IF -->
517
                                        <!-- TMPL_IF NAME="intransit" -->(In transit)<!-- /TMPL_IF -->
517
                                        <!-- TMPL_IF NAME="intransit" -->(In transit)<!-- /TMPL_IF -->
518
                                        <!-- TMPL_IF NAME="onhold" -->(On hold)<!-- /TMPL_IF -->
518
                                        <!-- TMPL_IF NAME="notforloan" --><!-- TMPL_VAR name="notforloan" --><!-- /TMPL_IF -->
519
                                        <!-- TMPL_IF NAME="notforloan" --><!-- TMPL_VAR name="notforloan" --><!-- /TMPL_IF -->
519
                                        (<!-- TMPL_VAR NAME="count" -->)</li>
520
                                        (<!-- TMPL_VAR NAME="count" -->)</li>
520
                                    <!-- /TMPL_LOOP --></ul>
521
                                    <!-- /TMPL_LOOP --></ul>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl (-1 / +1 lines)
Lines 406-412 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
406
					In transit from <!-- TMPL_VAR NAME="transfertfrom" -->
406
					In transit from <!-- TMPL_VAR NAME="transfertfrom" -->
407
					to <!-- TMPL_VAR NAME="transfertto" --> since <!-- TMPL_VAR NAME="transfertwhen" -->
407
					to <!-- TMPL_VAR NAME="transfertto" --> since <!-- TMPL_VAR NAME="transfertwhen" -->
408
				    <!-- TMPL_ELSE -->
408
				    <!-- TMPL_ELSE -->
409
					<!-- TMPL_IF NAME="waiting" -->On hold<!-- TMPL_ELSE --><!-- TMPL_IF NAME="onhold" -->On hold<!-- TMPL_ELSE -->Available<!-- /TMPL_IF --><!-- /TMPL_IF -->
409
					<!-- TMPL_IF NAME="waiting" -->On hold<!-- TMPL_ELSE -->Available<!-- /TMPL_IF -->
410
				    <!-- /TMPL_IF -->
410
				    <!-- /TMPL_IF -->
411
				<!-- /TMPL_IF -->
411
				<!-- /TMPL_IF -->
412
			    <!-- /TMPL_IF -->
412
			    <!-- /TMPL_IF -->
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl (-1 / +1 lines)
Lines 447-452 $(document).ready(function(){ Link Here
447
                    <!-- TMPL_UNLESS NAME="hidelostitems" --><!-- TMPL_IF NAME="itemlostcount" --> Lost (<!-- TMPL_VAR NAME="itemlostcount" -->),<!-- /TMPL_IF --><!-- /TMPL_UNLESS -->
447
                    <!-- TMPL_UNLESS NAME="hidelostitems" --><!-- TMPL_IF NAME="itemlostcount" --> Lost (<!-- TMPL_VAR NAME="itemlostcount" -->),<!-- /TMPL_IF --><!-- /TMPL_UNLESS -->
448
                    <!-- TMPL_IF NAME="damagedcount" --> Damaged (<!-- TMPL_VAR NAME="damagedcount" -->),<!-- /TMPL_IF -->
448
                    <!-- TMPL_IF NAME="damagedcount" --> Damaged (<!-- TMPL_VAR NAME="damagedcount" -->),<!-- /TMPL_IF -->
449
                    <!-- TMPL_IF NAME="orderedcount" --> On order (<!-- TMPL_VAR NAME="orderedcount" -->),<!-- /TMPL_IF -->
449
                    <!-- TMPL_IF NAME="orderedcount" --> On order (<!-- TMPL_VAR NAME="orderedcount" -->),<!-- /TMPL_IF -->
450
                    <!-- TMPL_IF NAME="onholdcount" --> On hold (<!-- TMPL_VAR NAME="onholdcount" -->),<!-- /TMPL_IF -->
450
                    <!-- TMPL_IF NAME="intransitcount" --> In transit (<!-- TMPL_VAR NAME="intransitcount" -->),<!-- /TMPL_IF -->
451
                    <!-- TMPL_IF NAME="intransitcount" --> In transit (<!-- TMPL_VAR NAME="intransitcount" -->),<!-- /TMPL_IF -->
451
                    </span>
452
                    </span>
452
                </span>
453
                </span>
453
- 

Return to bug 2655