From: Werner Hahn Date: Wed, 7 Apr 2021 17:40:39 +0000 (+0200) Subject: Shop: Standartartikelnr für Versandartikel X-Git-Tag: kivitendo-mebil_0.1-0~9^2~149 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=82034151ec366dadc859bb418bdfa41e780ca62b;p=kivitendo-erp.git Shop: Standartartikelnr für Versandartikel --- diff --git a/SL/ShopConnector/Shopware.pm b/SL/ShopConnector/Shopware.pm index 938f99b17..04cd69a59 100644 --- a/SL/ShopConnector/Shopware.pm +++ b/SL/ShopConnector/Shopware.pm @@ -151,6 +151,20 @@ sub import_data_to_shop_order { } $shop_order->positions($position-1); + if ( $self->config->shipping_costs_parts_id ) { + my $shipping_part = SL::DB::Part->find_by( id => $self->config->shipping_costs_parts_id); + my %shipping_pos = ( description => $import->{data}->{dispatch}->{name}, + partnumber => $shipping_part->partnumber, + price => $import->{data}->{invoiceShipping}, + quantity => 1, + position => $position, + shop_trans_id => 0, + shop_order_id => $id, + ); + my $shipping_pos_insert = SL::DB::ShopOrderItem->new(%shipping_pos); + $shipping_pos_insert->save; + } + my $customer = $shop_order->get_customer; if(ref($customer)){ diff --git a/templates/webpages/shops/form.html b/templates/webpages/shops/form.html index aae9d8a8b..cda1e0bb1 100644 --- a/templates/webpages/shops/form.html +++ b/templates/webpages/shops/form.html @@ -73,7 +73,7 @@ [% 'Default part for shipping costs' | $T8 %] - [%- P.part.picker('shop.shipping_costs_parts_id', 'SELF.shop.shipping_costs_parts_id', style="width: 300px") %] + [%- P.part.picker('shop.shipping_costs_parts_id', SELF.shop.shipping_costs_parts_id, style="width: 300px") %] [% 'Obsolete' | $T8 %]