X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FShopConnector%2FShopware.pm;h=65c42fd1445151228b1b2a28dd1e1868ab39328b;hb=ff159a4d47b9a2d10744dcfc23da2c63605c8a32;hp=d56f5e6790b16a1bee86a8fedb0f6b892a0d07e2;hpb=53f7b40841432dec27fcbb0772dc4adb11d9cda7;p=kivitendo-erp.git diff --git a/SL/ShopConnector/Shopware.pm b/SL/ShopConnector/Shopware.pm index d56f5e679..65c42fd14 100644 --- a/SL/ShopConnector/Shopware.pm +++ b/SL/ShopConnector/Shopware.pm @@ -11,6 +11,7 @@ use LWP::Authen::Digest; use SL::DB::ShopOrder; use SL::DB::ShopOrderItem; use SL::DB::History; +use SL::DB::PaymentTerm; use DateTime::Format::Strptime; use SL::DB::File; use Data::Dumper; @@ -185,6 +186,12 @@ sub map_data_to_shoporder { my $shop_id = $self->config->id; my $tax_included = $self->config->pricetype; + # Mapping Zahlungsmethoden muss an Firmenkonfiguration angepasst werden + my %payment_ids_methods = ( + # shopware_paymentId => kivitendo_payment_id + ); + my $default_payment = SL::DB::Manager::PaymentTerm->get_first(); + my $default_payment_id = $default_payment ? $default_payment->id : undef; # Mapping to table shoporders. See http://community.shopware.com/_detail_1690.html#GET_.28Liste.29 my %columns = ( amount => $import->{data}->{invoiceAmount}, @@ -232,7 +239,7 @@ sub map_data_to_shoporder { netamount => $import->{data}->{invoiceAmountNet}, order_date => $orderdate, payment_description => $import->{data}->{payment}->{description}, - payment_id => $import->{data}->{paymentId}, + payment_id => $payment_ids_methods{$import->{data}->{paymentId}} || $default_payment_id, remote_ip => $import->{data}->{remoteAddress}, sepa_account_holder => $import->{data}->{paymentIntances}->{accountHolder}, sepa_bic => $import->{data}->{paymentIntances}->{bic}, @@ -461,7 +468,7 @@ __END__ =head1 NAME -SL::Shopconnecter::Shopware - connector for shopware 5 +SL::Shopconnector::Shopware - connector for shopware 5 =head1 SYNOPSIS