Lines 465-477
sub get_order_infos {
Link Here
|
465 |
my $itemcount = GetItemsCount($biblionumber); |
465 |
my $itemcount = GetItemsCount($biblionumber); |
466 |
my $holds_count = $biblio ? $biblio->holds->count : 0; |
466 |
my $holds_count = $biblio ? $biblio->holds->count : 0; |
467 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
467 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
468 |
my $itemholds; |
468 |
my $itemholds = $biblio ? $biblio->holds->search({ itemnumber => { -in => \@items } })->count : 0; |
469 |
foreach my $item (@items){ |
469 |
|
470 |
my $nb = GetItemHolds($biblionumber, $item); |
|
|
471 |
if ($nb){ |
472 |
$itemholds += $nb; |
473 |
} |
474 |
} |
475 |
# if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 |
470 |
# if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 |
476 |
$line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds_count); |
471 |
$line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds_count); |
477 |
$line{items} = ($itemcount) - (scalar @items); |
472 |
$line{items} = ($itemcount) - (scalar @items); |