Revision 5f2204ca
Von Werner Hahn vor fast 7 Jahren hinzugefügt
SL/DB/ShopOrder.pm | ||
---|---|---|
43 | 43 |
require SL::DB::Shipto; |
44 | 44 |
|
45 | 45 |
my @items = map{ |
46 |
# TODO Flash and exit if part not found |
|
46 | 47 |
my $part = SL::DB::Part->new( partnumber => $_->partnumber )->load; |
48 |
my $shop_part = SL::DB::Manager::ShopPart->get_all( where => [ shop_id => $self->shop_id, part_id => $part->id] )->[0]; |
|
49 |
|
|
47 | 50 |
my @cvars = map { ($_->config->name => { value => $_->value_as_text, is_valid => $_->is_valid }) } @{ $part->cvars_by_config } ; |
48 | 51 |
my $current_order_item = |
49 | 52 |
SL::DB::OrderItem->new(parts_id => $part->id, |
... | ... | |
52 | 55 |
sellprice => $_->price, |
53 | 56 |
unit => $part->unit, |
54 | 57 |
position => $_->position, |
55 |
active_price_source => ( $_->price == 0 ? "" : "pricegroup/908"), #TODO Hardcoded
|
|
58 |
active_price_source => $shop_part->active_price_source,
|
|
56 | 59 |
); |
57 | 60 |
}@{ $self->shop_order_items }; |
58 | 61 |
|
... | ... | |
92 | 95 |
employee_id => $employee->id, |
93 | 96 |
intnotes => ($customer->notes ne "" ? "\n[Kundestammdaten]\n" . $customer->notes : ""), |
94 | 97 |
salesman_id => $employee->id, |
95 |
taxincluded => 1, # TODO: make variable
|
|
98 |
taxincluded => $self->tax_included,
|
|
96 | 99 |
payment_id => $customer->payment_id, |
97 | 100 |
taxzone_id => $customer->taxzone_id, |
98 | 101 |
currency_id => $customer->currency_id, |
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