ShopApi: statussetzen bei Rechnung schreiben Syntaxfehler behoben
authorWerner Hahn <wh@futureworldsearch.net>
Wed, 27 Jan 2021 08:49:28 +0000 (09:49 +0100)
committerWerner Hahn <wh@futureworldsearch.net>
Wed, 7 Apr 2021 14:42:18 +0000 (16:42 +0200)
SL/IS.pm

index bda82bc..f9ff507 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1445,12 +1445,12 @@ SQL
   my $invoice = SL::DB::Invoice->new( id => $form->{id} )->load;
   my @linked_shop_orders = $invoice->linked_records(
     from      => 'ShopOrder',
-    via       => ['Order', 'DeliveryOrder'],
+    via       => ['DeliveryOrder','Order',],
   );
   if (scalar @linked_shop_orders == 1){
     #do update
     my $shop_order = $linked_shop_orders[0][0];
-  require SL::Shop;
+    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 );
     $shop->connector->set_orderstatus($shop_order->shop_trans_id, "completed");