Revision fd7b3843
Von Sven Schöling vor mehr als 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
1665 | 1665 |
# always save |
1666 | 1666 |
$self->save(); |
1667 | 1667 |
|
1668 |
# check for direct delivery |
|
1669 |
# copy shipto in custom shipto (custom shipto will be copied by new_from() in case) |
|
1670 |
my $custom_shipto; |
|
1671 |
if ($self->type_data->workflow("to_order_copy_shipto") && $::form->{use_shipto} && $self->order->shipto) { |
|
1672 |
$custom_shipto = $self->order->shipto->clone('SL::DB::DeliveryOrder'); |
|
1673 |
} |
|
1674 |
|
|
1675 | 1668 |
my $delivery_order = SL::Model::Record->new_from_workflow($self->order, $destination_type, {}); |
1676 | 1669 |
$self->order($delivery_order); |
1677 | 1670 |
$self->{converted_from_oe_id} = delete $::form->{id}; |
... | ... | |
1681 | 1674 |
$item->{new_fake_id} = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000); |
1682 | 1675 |
} |
1683 | 1676 |
|
1684 |
if ($self->type_data->workflow("to_order_copy_shipto")) { |
|
1685 |
if ($::form->{use_shipto}) { |
|
1686 |
$self->order->custom_shipto($custom_shipto) if $custom_shipto; |
|
1687 |
} else { |
|
1688 |
# remove any custom shipto if not wanted |
|
1689 |
$self->order->custom_shipto(SL::DB::Shipto->new(module => 'OE', custom_variables => [])); |
|
1690 |
} |
|
1691 |
} |
|
1692 |
|
|
1693 | 1677 |
# change form type |
1694 | 1678 |
$::form->{type} = $destination_type; |
1695 | 1679 |
$self->type($self->init_type); |
Auch abrufbar als: Unified diff
DeliveryOrder: direct delivery check entfernt
Direct Delivery war als feature nie in Lieferscheinen vorhanden, die
Funktion war ungenutzt.