From b1a92c5647cfba337902208c097a2273233197f2 Mon Sep 17 00:00:00 2001 From: Werner Hahn Date: Tue, 2 Mar 2021 16:38:51 +0100 Subject: [PATCH] =?utf8?q?Webshop=20Order=20Zahlungsbedingen=20mit=20?= =?utf8?q?=C3=BCbergeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/ShopOrder.pm | 2 +- SL/ShopConnector/WooCommerce.pm | 9 +++++++-- templates/webpages/shop_order/show.html | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/SL/DB/ShopOrder.pm b/SL/DB/ShopOrder.pm index 8ee8d0ec3..eef7b6ce5 100644 --- a/SL/DB/ShopOrder.pm +++ b/SL/DB/ShopOrder.pm @@ -96,7 +96,7 @@ sub convert_to_sales_order { intnotes => $customer->notes, salesman_id => $employee->id, taxincluded => $self->tax_included, - payment_id => $customer->payment_id, + payment_id => $self->payment_id, taxzone_id => $customer->taxzone_id, currency_id => $customer->currency_id, transaction_description => $shop->transaction_description, diff --git a/SL/ShopConnector/WooCommerce.pm b/SL/ShopConnector/WooCommerce.pm index 7e8f6c872..06a4b39d8 100644 --- a/SL/ShopConnector/WooCommerce.pm +++ b/SL/ShopConnector/WooCommerce.pm @@ -203,6 +203,11 @@ sub map_data_to_shoporder { } else { $d_street = $import->{billing}->{address_1} . ($import->{billing}->{address_2} ? " " . $import->{billing}->{address_2} : ""); } + # Mapping Zahlungsmethoden muss an Firmenkonfiguration angepasst werden + my %payment_ids_methods = ( + 'paypal' => 2489, + 'german_market_purchase_on_account' => 2487, + ); my %columns = ( #billing Shop can have different billing addresses, and may have 1 customer_address billing_firstname => $import->{billing}->{first_name}, @@ -292,9 +297,9 @@ sub map_data_to_shoporder { #prices_include_tax tax_included => $tax_included, #payment_method - # ??? payment_id => $import->{payment_method}, + payment_id => $payment_ids_methods{$import->{payment_method}} || 2487, #payment_method_title - payment_description => $import->{payment}->{payment_method_title}, + payment_description => $import->{payment_method_title}, #transaction_id shop_trans_id => $import->{id}, #date_paid diff --git a/templates/webpages/shop_order/show.html b/templates/webpages/shop_order/show.html index ccbe412c7..7f5555051 100644 --- a/templates/webpages/shop_order/show.html +++ b/templates/webpages/shop_order/show.html @@ -118,6 +118,7 @@ [% 'Shop Ordernotes' | $T8 %][% HTML.escape(IMPORT.shop_customer_comment) %] [% 'Shop Orderamount' | $T8 %][% HTML.escape(IMPORT.amount_as_number) %] [% 'Shipping costs' | $T8 %][% HTML.escape(IMPORT.shipping_costs_as_number) %] + [% 'Payment description' | $T8 %][% HTML.escape(IMPORT.payment_description) %] -- 2.20.1