X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/457e1237959ddf06c2198e2fba1768adc8053840..008b51c43d064b8172168aee7fdff393c5d4b13a:/SL/ShopConnector/Shopware.pm diff --git a/SL/ShopConnector/Shopware.pm b/SL/ShopConnector/Shopware.pm index 7e879bfef..a777ddfb2 100644 --- a/SL/ShopConnector/Shopware.pm +++ b/SL/ShopConnector/Shopware.pm @@ -190,7 +190,8 @@ sub map_data_to_shoporder { my %payment_ids_methods = ( # shopware_paymentId => kivitendo_payment_id ); - my $default_payment_id = SL::DB::Manager::PaymentTerm->get_first()->id || undef; + 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},