Revision 14fd8710
Von Werner Hahn vor mehr als 3 Jahren hinzugefügt
SL/DB/ShopOrder.pm | ||
---|---|---|
9 | 9 |
use SL::DB::Shop; |
10 | 10 |
use SL::DB::MetaSetup::ShopOrder; |
11 | 11 |
use SL::DB::Manager::ShopOrder; |
12 |
use SL::DB::PaymentTerm; |
|
12 | 13 |
use SL::DB::Helper::LinkedRecords; |
13 | 14 |
use SL::Locale::String qw(t8); |
14 | 15 |
use Carp; |
... | ... | |
187 | 188 |
my $customer_proposals = $self->check_for_existing_customers; |
188 | 189 |
my $name = $self->billing_firstname . " " . $self->billing_lastname; |
189 | 190 |
my $customer = 0; |
191 |
my $payment_id = SL::DB::Manager::PaymentTerm->get_first()->id || undef; |
|
190 | 192 |
if(!scalar(@{$customer_proposals})){ |
191 | 193 |
my %address = ( 'name' => $name, |
192 | 194 |
'department_1' => $self->billing_company, |
... | ... | |
205 | 207 |
'pricegroup_id' => (split '\/',$shop->price_source)[0] eq "pricegroup" ? (split '\/',$shop->price_source)[1] : undef, |
206 | 208 |
'taxzone_id' => $shop->taxzone_id, |
207 | 209 |
'currency' => $::instance_conf->get_currency_id, |
208 |
#'payment_id' => 7345,# TODO hardcoded
|
|
210 |
'payment_id' => $payment_id,
|
|
209 | 211 |
); |
210 | 212 |
$customer = SL::DB::Customer->new(%address); |
211 | 213 |
|
Auch abrufbar als: Unified diff
WebshopApi: Zahlungsbedingung beim Kundenanlegen ...
für den Kunden die die 1. Zahlungsbedingung übernehmen