Bug 17736: [QA Follow-up] Crashes in basket.pl and parcel.pl
Crash in basket.pl: Can't call method "holds" on an undefined value at /usr/share/koha/masterclone/acqui/basket.pl line 466. Comes from a biblionumber == NULL in aqorders where I cancelled the order and deleted the biblio. Crash in parcel.pl: Can't call method "holds" on an undefined value at /usr/share/koha/masterclone/acqui/parcel.pl line 246. Similar fix. Trivial fixes indeed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
e1dce7dd5b
commit
703b97f22d
|
|
@ -141,11 +141,11 @@ for my $order ( @orders ) {
|
|||
$line{holds} = 0;
|
||||
my @itemnumbers = GetItemnumbersFromOrder( $order->{ordernumber} );
|
||||
my $biblio = Koha::Biblios->find( $line{biblionumber} );
|
||||
$line{holds} = $biblio->current_holds->search(
|
||||
$line{holds} = $biblio ? $biblio->current_holds->search(
|
||||
{
|
||||
itemnumber => { -in => \@itemnumbers },
|
||||
}
|
||||
)->count;
|
||||
)->count : 0;
|
||||
$line{budget} = GetBudgetByOrderNumber( $line{ordernumber} );
|
||||
|
||||
$line{tax_value} = $line{tax_value_on_receiving};
|
||||
|
|
|
|||
Loading…
Reference in New Issue