Revision 5f2204ca
Von Werner Hahn vor fast 7 Jahren hinzugefügt
SL/ShopConnector/Shopware.pm | ||
---|---|---|
101 | 101 |
shop_id => $self->config->id, |
102 | 102 |
shop_ordernumber => $import->{data}->{number}, |
103 | 103 |
shop_trans_id => $import->{data}->{id}, |
104 |
tax_included => ($import->{data}->{net} == 0 ? 0 : 1)
|
|
104 |
tax_included => $self->config->pricetype eq "brutto" ? 1 : 0,
|
|
105 | 105 |
); |
106 | 106 |
my $shop_order = SL::DB::ShopOrder->new(%columns); |
107 | 107 |
$shop_order->save; |
... | ... | |
112 | 112 |
foreach my $pos(@positions) { |
113 | 113 |
my $price = $::form->round_amount($pos->{price},2); |
114 | 114 |
|
115 |
my %pos_columns = ( description => $pos->{articleName}, |
|
116 |
partnumber => $pos->{articleNumber}, |
|
117 |
price => $price, |
|
118 |
quantity => $pos->{quantity}, |
|
119 |
position => $position, |
|
120 |
tax_rate => $pos->{taxRate}, |
|
121 |
shop_trans_id => $pos->{articleId}, |
|
122 |
shop_order_id => $id, |
|
115 |
my %pos_columns = ( description => $pos->{articleName}, |
|
116 |
partnumber => $pos->{articleNumber}, |
|
117 |
price => $price, |
|
118 |
quantity => $pos->{quantity}, |
|
119 |
position => $position, |
|
120 |
tax_rate => $pos->{taxRate}, |
|
121 |
shop_trans_id => $pos->{articleId}, |
|
122 |
shop_order_id => $id, |
|
123 |
active_price_source => $self->config->price_source, |
|
123 | 124 |
); |
124 | 125 |
my $pos_insert = SL::DB::ShopOrderItem->new(%pos_columns); |
125 | 126 |
$pos_insert->save; |
... | ... | |
161 | 162 |
'ustid' => $shop_order->billing_vat, |
162 | 163 |
'taxincluded_checked' => $self->config->pricetype eq "brutto" ? 1 : 0, |
163 | 164 |
'taxincluded' => $self->config->pricetype eq "brutto" ? 1 : 0, |
164 |
'pricegroup_id' => (split '\/',$self->config->price_source)[1],
|
|
165 |
'pricegroup_id' => (split '\/',$self->config->price_source)[0] eq "pricegroup" ? (split '\/',$self->config->price_source)[1] : undef,
|
|
165 | 166 |
'taxzone_id' => $self->config->taxzone_id, |
166 | 167 |
'currency' => 1, # TODO hardcoded |
167 |
'payment_id' => 7345,# TODO hardcoded |
|
168 |
#'payment_id' => 7345,# TODO hardcoded
|
|
168 | 169 |
); |
169 | 170 |
my $customer = SL::DB::Customer->new(%address); |
170 | 171 |
$customer->save; |
Auch abrufbar als: Unified diff
Shopmodul: active_price_source anhand von Shopartikelkonfiguration mit in Shoporder übernommen, Kundenpreisgruppe anhand von Shopkonfiguration beim anlegen des Kunden übernommen