ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / acqui / parcel.pl
index 9c16c9c..d2b2e00 100755 (executable)
@@ -125,6 +125,7 @@ my $total_tax_included = 0;
 my $subtotal_for_funds;
 for my $order ( @orders ) {
     $order->{'unitprice'} += 0;
+    $order->{'booksellerid'} = $booksellerid; # required for basket group links
 
     my $order_object = Koha::Acquisition::Orders->find($order->{ordernumber});
     if ( $bookseller->invoiceincgst ) {
@@ -241,6 +242,10 @@ unless( defined $invoice->{closedate} ) {
 
         my $biblionumber = $line{'biblionumber'};
         my $biblio = Koha::Biblios->find( $biblionumber );
+               if ( ! $biblio ) {
+                       use Data::Dump qw(dump);
+                       warn "FATAL ERROR: biblionumber $biblionumber not found in line: ",dump( \%line );
+               }
         my $countbiblio = CountBiblioInOrders($biblionumber);
         my $ordernumber = $line{'ordernumber'};
         my $order_object = Koha::Acquisition::Orders->find($ordernumber);