Lines 141-151
for my $order ( @orders ) {
Link Here
|
141 |
$line{holds} = 0; |
141 |
$line{holds} = 0; |
142 |
my @itemnumbers = GetItemnumbersFromOrder( $order->{ordernumber} ); |
142 |
my @itemnumbers = GetItemnumbersFromOrder( $order->{ordernumber} ); |
143 |
my $biblio = Koha::Biblios->find( $line{biblionumber} ); |
143 |
my $biblio = Koha::Biblios->find( $line{biblionumber} ); |
144 |
$line{holds} = $biblio->current_holds->search( |
144 |
$line{holds} = $biblio ? $biblio->current_holds->search( |
145 |
{ |
145 |
{ |
146 |
itemnumber => { -in => \@itemnumbers }, |
146 |
itemnumber => { -in => \@itemnumbers }, |
147 |
} |
147 |
} |
148 |
)->count; |
148 |
)->count : 0; |
149 |
$line{budget} = GetBudgetByOrderNumber( $line{ordernumber} ); |
149 |
$line{budget} = GetBudgetByOrderNumber( $line{ordernumber} ); |
150 |
|
150 |
|
151 |
$line{tax_value} = $line{tax_value_on_receiving}; |
151 |
$line{tax_value} = $line{tax_value_on_receiving}; |
Lines 243-249
unless( defined $invoice->{closedate} ) {
Link Here
|
243 |
my $ordernumber = $line{'ordernumber'}; |
243 |
my $ordernumber = $line{'ordernumber'}; |
244 |
my @subscriptions = GetSubscriptionsId ($biblionumber); |
244 |
my @subscriptions = GetSubscriptionsId ($biblionumber); |
245 |
my $itemcount = GetItemsCount($biblionumber); |
245 |
my $itemcount = GetItemsCount($biblionumber); |
246 |
my $holds_count = $biblio->holds->count; |
246 |
my $holds_count = $biblio ? $biblio->holds->count : 0; |
247 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
247 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
248 |
my $itemholds; |
248 |
my $itemholds; |
249 |
foreach my $item (@items){ |
249 |
foreach my $item (@items){ |
250 |
- |
|
|