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