Revision 98c122d1
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
33 | 33 |
use SL::DB::Shipto; |
34 | 34 |
use SL::DB::Translation; |
35 | 35 |
use SL::DB::ValidityToken; |
36 |
use SL::Model::Record; |
|
36 | 37 |
|
37 | 38 |
use SL::Helper::CreatePDF qw(:all); |
38 | 39 |
use SL::Helper::PrintOptions; |
... | ... | |
107 | 108 |
|
108 | 109 |
my $reclamation = SL::DB::Reclamation->new(id => $::form->{from_id})->load; |
109 | 110 |
my %params; |
110 |
$params{destination_type} = $reclamation->is_sales ? 'sales_order'
|
|
111 |
: 'purchase_order';
|
|
112 |
my $order = SL::DB::Order->new_from($reclamation, %params);
|
|
111 |
my $target_type = $reclamation->is_sales ? 'sales_order'
|
|
112 |
: 'purchase_order'; |
|
113 |
my $order = SL::Model::Record->new_from_workflow($reclamation, $target_type);
|
|
113 | 114 |
$self->{converted_from_reclamation_id} = $::form->{from_id}; |
114 | 115 |
|
115 | 116 |
$self->order($order); |
Auch abrufbar als: Unified diff
Model::Record: new_from_workflow implementiert