X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b1a92c5647cfba337902208c097a2273233197f2..008b51c43d064b8172168aee7fdff393c5d4b13a:/SL/DB/ShopOrder.pm diff --git a/SL/DB/ShopOrder.pm b/SL/DB/ShopOrder.pm index eef7b6ce5..ae5d8568f 100644 --- a/SL/DB/ShopOrder.pm +++ b/SL/DB/ShopOrder.pm @@ -188,7 +188,8 @@ sub get_customer{ my $customer_proposals = $self->check_for_existing_customers; my $name = $self->billing_firstname . " " . $self->billing_lastname; my $customer = 0; - my $payment_id = SL::DB::Manager::PaymentTerm->get_first()->id || undef; + my $default_payment = SL::DB::Manager::PaymentTerm->get_first(); + my $payment_id = $default_payment ? $default_payment->id : undef; if(!scalar(@{$customer_proposals})){ my %address = ( 'name' => $name, 'department_1' => $self->billing_company,