use C4::Output;
use C4::Biblio;
use C4::Items;
+use C4::Circulation;
use C4::Tags qw(get_tags);
use C4::Dates qw/format_date/;
use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn get_biblio_from_xisbn);
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber ) );
my $norequests = 1;
+my $branches = GetBranches();
my %itemfields;
for my $itm (@items) {
$norequests = 0 && $norequests
if ( (not $itm->{'wthdrawn'} )
- || (not $itm->{'itemlost'} )
- || (not $itm->{'itemnotforloan'} )
- || ($itm->{'itemnumber'} ) );
- $itm->{ $itm->{'publictype'} } = 1;
+ && (not $itm->{'itemlost'} )
+ && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} )
+ && (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
+ && ($itm->{'itemnumber'} ) );
+
+ $itm->{ $itm->{'publictype'} } = 1;
$itm->{datedue} = format_date($itm->{datedue});
$itm->{datelastseen} = format_date($itm->{datelastseen});
$itemfields{ccode} = 1 if($itm->{ccode});
$itemfields{enumchron} = 1 if($itm->{enumchron});
$itemfields{copynumber} = 1 if($itm->{copynumber});
+ $itemfields{itemnotes} = 1 if($itm->{itemnotes});
# walk through the item-level authorised values and populate some images
my $item_authorised_value_images = C4::Items::get_authorised_value_images( C4::Items::get_item_authorised_values( $itm->{'itemnumber'} ) );
$itm->{'lostimagelabel'} = $lostimageinfo->{ 'label' };
}
+
+ my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber});
+ if ( $transfertwhen ne '' ) {
+ $itm->{transfertwhen} = format_date($transfertwhen);
+ $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
+ $itm->{transfertto} = $branches->{$transfertto}{branchname};
+ }
}
## get notes and subjects from MARC record
itemdata_ccode => $itemfields{ccode},
itemdata_enumchron => $itemfields{enumchron},
itemdata_copynumber => $itemfields{copynumber},
+ itemdata_itemnotes => $itemfields{itemnotes},
authorised_value_images => $biblio_authorised_value_images,
subtitle => $subtitle,
);
my ($starting_cn_sort, $starting_homebranch, $starting_location);
my $sth_get_cn_sort = $dbh->prepare("SELECT cn_sort,homebranch,location from items where itemnumber=?");
$sth_get_cn_sort->execute($starting_itemnumber);
-my $branches = GetBranches();
while (my $result = $sth_get_cn_sort->fetchrow_hashref()) {
$starting_cn_sort = $result->{'cn_sort'};
$starting_homebranch->{code} = $result->{'homebranch'};