From 14fd87107e86d96894c3f731245172ec04554dd1 Mon Sep 17 00:00:00 2001 From: Werner Hahn Date: Thu, 24 Jun 2021 11:31:03 +0200 Subject: [PATCH] WebshopApi: Zahlungsbedingung beim Kundenanlegen ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit für den Kunden die die 1. Zahlungsbedingung übernehmen --- SL/DB/ShopOrder.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/DB/ShopOrder.pm b/SL/DB/ShopOrder.pm index 2752de627..8ee8d0ec3 100644 --- a/SL/DB/ShopOrder.pm +++ b/SL/DB/ShopOrder.pm @@ -9,6 +9,7 @@ use SL::DBUtils; use SL::DB::Shop; use SL::DB::MetaSetup::ShopOrder; use SL::DB::Manager::ShopOrder; +use SL::DB::PaymentTerm; use SL::DB::Helper::LinkedRecords; use SL::Locale::String qw(t8); use Carp; @@ -187,6 +188,7 @@ 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; if(!scalar(@{$customer_proposals})){ my %address = ( 'name' => $name, 'department_1' => $self->billing_company, @@ -205,7 +207,7 @@ sub get_customer{ 'pricegroup_id' => (split '\/',$shop->price_source)[0] eq "pricegroup" ? (split '\/',$shop->price_source)[1] : undef, 'taxzone_id' => $shop->taxzone_id, 'currency' => $::instance_conf->get_currency_id, - #'payment_id' => 7345,# TODO hardcoded + 'payment_id' => $payment_id, ); $customer = SL::DB::Customer->new(%address); -- 2.20.1