Revision fbee3bde
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
t/workflow/reclamation_reclamation.t | ||
---|---|---|
22 | 22 |
use SL::DB::Employee; |
23 | 23 |
use SL::DB::Part; |
24 | 24 |
use SL::DB::Unit; |
25 |
use SL::Model::Record; |
|
25 | 26 |
|
26 | 27 |
use Rose::DB::Object::Helpers qw(clone); |
27 | 28 |
|
... | ... | |
150 | 151 |
)->load; |
151 | 152 |
|
152 | 153 |
# new |
153 |
my $new_sales_reclamation = SL::DB::Reclamation->new_from($sales_reclamation, destination_type => 'sales_reclamation')->save->load;
|
|
154 |
my $new_purchase_reclamation = SL::DB::Reclamation->new_from($purchase_reclamation, destination_type => 'purchase_reclamation')->save->load;
|
|
154 |
my $new_sales_reclamation = SL::Model::Record->new_from_workflow($sales_reclamation, 'sales_reclamation')->save->load;
|
|
155 |
my $new_purchase_reclamation = SL::Model::Record->new_from_workflow($purchase_reclamation, 'purchase_reclamation')->save->load;
|
|
155 | 156 |
|
156 | 157 |
# convert |
157 |
my $converted_purchase_reclamation = SL::DB::Reclamation->new_from($sales_reclamation, destination_type => 'purchase_reclamation');
|
|
158 |
my $converted_purchase_reclamation = SL::Model::Record->new_from_workflow($sales_reclamation, 'purchase_reclamation');
|
|
158 | 159 |
$converted_purchase_reclamation->vendor_id($purchase_reclamation->{vendor_id}); |
159 | 160 |
$converted_purchase_reclamation->save->load; |
160 |
my $converted_sales_reclamation = SL::DB::Reclamation->new_from($purchase_reclamation, destination_type => 'sales_reclamation');
|
|
161 |
my $converted_sales_reclamation = SL::Model::Record->new_from_workflow($purchase_reclamation, 'sales_reclamation');
|
|
161 | 162 |
$converted_sales_reclamation->customer_id($sales_reclamation->{customer_id}); |
162 | 163 |
$converted_sales_reclamation->save->load; |
163 | 164 |
|
Auch abrufbar als: Unified diff
MOdel::Record: Test angepasst