| Lines 502-507
          sub item_group {
      
      
        Link Here | 
        
          | 502 |     return $item_group; | 502 |     return $item_group; | 
        
          | 503 | } | 503 | } | 
        
          | 504 |  | 504 |  | 
            
              |  |  | 505 | =head3 item_group_item | 
            
              | 506 |  | 
            
              | 507 |     my $item_group_item = $item->item_group_item; | 
            
              | 508 |  | 
            
              | 509 | Return the item group for this item | 
            
              | 510 |  | 
            
              | 511 | =cut | 
            
              | 512 |  | 
        
          | 505 | sub item_group_item { | 513 | sub item_group_item { | 
        
          | 506 |     my ( $self ) = @_; | 514 |     my ( $self ) = @_; | 
        
          | 507 |     my $rs = $self->_result->item_group_item; | 515 |     my $rs = $self->_result->item_group_item; | 
  
    | Lines 792-797
          sub get_transfer {
      
      
        Link Here | 
        
          | 792 |     return  Koha::Item::Transfer->_new_from_dbic($transfer) if $transfer; | 800 |     return  Koha::Item::Transfer->_new_from_dbic($transfer) if $transfer; | 
        
          | 793 | } | 801 | } | 
        
          | 794 |  | 802 |  | 
            
              |  |  | 803 | =head3 transfer | 
            
              | 804 |  | 
            
              | 805 |     my $transfer = $item->transfer; | 
            
              | 806 |  | 
            
              | 807 | Returns the active transfer request. Returns I<undef> if no active transfer | 
            
              | 808 | is found. | 
            
              | 809 |  | 
            
              | 810 | Note: Transfers are retrieved in a Modified FIFO (First In First Out) order | 
            
              | 811 | whereby the most recently sent, but not received, transfer will be returned | 
            
              | 812 | if it exists, otherwise the oldest unsatisfied transfer will be returned. | 
            
              | 813 |  | 
            
              | 814 | This allows for transfers to queue, which is the case for stock rotation and | 
            
              | 815 | rotating collections where a manual transfer may need to take precedence but | 
            
              | 816 | we still expect the item to end up at a final location eventually. | 
            
              | 817 |  | 
            
              | 818 | =cut | 
            
              | 819 |  | 
        
          | 795 | sub transfer { | 820 | sub transfer { | 
        
          | 796 |     return shift->get_transfer(@_); | 821 |     return shift->get_transfer(@_); | 
        
          | 797 | } | 822 | } | 
  
    | Lines 1078-1083
          sub current_holds {
      
      
        Link Here | 
        
          | 1078 |     return Koha::Holds->_new_from_dbic($hold_rs); | 1103 |     return Koha::Holds->_new_from_dbic($hold_rs); | 
        
          | 1079 | } | 1104 | } | 
        
          | 1080 |  | 1105 |  | 
            
              |  |  | 1106 | =head3 first_hold | 
            
              | 1107 |  | 
            
              | 1108 |     my $first_hold = $item->first_hold; | 
            
              | 1109 |  | 
            
              | 1110 | Returns the first I<Koha::Hold> for the item. | 
            
              | 1111 |  | 
            
              | 1112 | =cut | 
            
              | 1113 |  | 
        
          | 1081 | sub first_hold { | 1114 | sub first_hold { | 
        
          | 1082 |     my ( $self ) = @_; | 1115 |     my ( $self ) = @_; | 
        
          | 1083 |     return $self->current_holds->next; | 1116 |     return $self->current_holds->next; | 
  
    | Lines 1769-1775
          sub to_api_mapping {
      
      
        Link Here | 
        
          | 1769 |  | 1802 |  | 
        
          | 1770 |     my $itemtype = $item->itemtype; | 1803 |     my $itemtype = $item->itemtype; | 
        
          | 1771 |  | 1804 |  | 
          
            
              | 1772 |     Returns Koha object for effective itemtype | 1805 | Returns Koha object for effective itemtype | 
        
          | 1773 |  | 1806 |  | 
        
          | 1774 | =cut | 1807 | =cut | 
        
          | 1775 |  | 1808 |  | 
  
    | Lines 1778-1783
          sub itemtype {
      
      
        Link Here | 
        
          | 1778 |  | 1811 |  | 
        
          | 1779 |     return Koha::ItemTypes->find( $self->effective_itemtype ); | 1812 |     return Koha::ItemTypes->find( $self->effective_itemtype ); | 
        
          | 1780 | } | 1813 | } | 
            
              |  |  | 1814 |  | 
            
              | 1815 | =head3 item_type | 
            
              | 1816 |  | 
            
              | 1817 |     my $item_type = $item->item_type; | 
            
              | 1818 |  | 
            
              | 1819 | Returns the effective I<Koha::ItemType> for the item. | 
            
              | 1820 |  | 
            
              | 1821 | FIXME: it should either return the 'real item type' or undef if no item type | 
            
              | 1822 | defined. And effective_itemtype should return... the effective itemtype. Right | 
            
              | 1823 | now it returns an id... This is all inconsistent. And the API should make it clear | 
            
              | 1824 | if the attribute is part of the resource, or a calculated value i.e. if the item | 
            
              | 1825 | is not linked to an item type on its own, then the API response should contain | 
            
              | 1826 | item_type: null! And the effective item type... be another attribute. I understand | 
            
              | 1827 | that this complicates filtering, but some query trickery could do it in the controller. | 
            
              | 1828 |  | 
            
              | 1829 | =cut | 
            
              | 1830 |  | 
        
          | 1781 | sub item_type { | 1831 | sub item_type { | 
        
          | 1782 |     return shift->itemtype; | 1832 |     return shift->itemtype; | 
        
          | 1783 | } | 1833 | } | 
  
    | Lines 2389-2394
          sub is_denied_renewal {
      
      
        Link Here | 
        
          | 2389 |     return 0; | 2439 |     return 0; | 
        
          | 2390 | } | 2440 | } | 
        
          | 2391 |  | 2441 |  | 
            
              |  |  | 2442 | =head3 analytics_count | 
            
              | 2443 |  | 
            
              | 2444 |     my $analytics_count = $item->analytics_count; | 
            
              | 2445 |  | 
            
              | 2446 | Return the related analytic records count. | 
            
              | 2447 |  | 
            
              | 2448 | It returns 0 if I<EasyAnalyticalRecords> is disabled. | 
            
              | 2449 |  | 
            
              | 2450 | =cut | 
            
              | 2451 |  | 
        
          | 2392 | sub analytics_count { | 2452 | sub analytics_count { | 
        
          | 2393 |     my ($self) = @_; | 2453 |     my ($self) = @_; | 
        
          | 2394 |     return C4::Items::GetAnalyticsCount($self->itemnumber); | 2454 |     return C4::Items::GetAnalyticsCount($self->itemnumber); | 
            
              | 2395 | -  |  |  |