SHOPOrders Status setzten bei Rechnungen korrigiert
authorWerner Hahn <wh@futureworldsearch.net>
Sat, 13 Mar 2021 15:47:17 +0000 (16:47 +0100)
committerWerner Hahn <wh@futureworldsearch.net>
Wed, 7 Apr 2021 14:42:21 +0000 (16:42 +0200)
SL/IS.pm

index f9ff507..7cf8008 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1447,9 +1447,9 @@ SQL
     from      => 'ShopOrder',
     via       => ['DeliveryOrder','Order',],
   );
-  if (scalar @linked_shop_orders == 1){
     #do update
     my $shop_order = $linked_shop_orders[0][0];
+  if ( $shop_order ) {
     require SL::Shop;
     my $shop_config = SL::DB::Manager::Shop->get_first( query => [ id => $shop_order->shop_id ] );
     my $shop = SL::Shop->new( config => $shop_config );