Revision fbee3bde
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
t/workflow/delivery_order_reclamation.t | ||
---|---|---|
24 | 24 |
use SL::DB::Employee; |
25 | 25 |
use SL::DB::Part; |
26 | 26 |
use SL::DB::Unit; |
27 |
use SL::Model::Record; |
|
27 | 28 |
|
28 | 29 |
use Rose::DB::Object::Helpers qw(clone); |
29 | 30 |
|
... | ... | |
180 | 181 |
)->load; |
181 | 182 |
|
182 | 183 |
# convert order → reclamation |
183 |
my $converted_sales_reclamation = $sales_delivery_order->convert_to_reclamation;
|
|
184 |
my $converted_sales_reclamation = SL::Model::Record->new_from_workflow($sales_delivery_order, "sales_reclamation");
|
|
184 | 185 |
$converted_sales_reclamation->items_sorted->[0]->reason($relamation_reason); |
185 | 186 |
$converted_sales_reclamation->items_sorted->[1]->reason($relamation_reason); |
186 | 187 |
$converted_sales_reclamation->save->load; |
187 |
my $converted_purchase_reclamation = $purchase_delivery_order->convert_to_reclamation;
|
|
188 |
my $converted_purchase_reclamation = SL::Model::Record->new_from_workflow($purchase_delivery_order, "purchase_reclamation");
|
|
188 | 189 |
$converted_purchase_reclamation->items_sorted->[0]->reason($relamation_reason); |
189 | 190 |
$converted_purchase_reclamation->items_sorted->[1]->reason($relamation_reason); |
190 | 191 |
$converted_purchase_reclamation->save->load; |
191 | 192 |
|
193 |
# TODO: use SL::Model::Record for conversion |
|
192 | 194 |
# convert reclamation → order |
193 | 195 |
my $converted_sales_delivery_order = $sales_reclamation->convert_to_delivery_order->save->load; |
194 | 196 |
my $converted_purchase_delivery_order = $purchase_reclamation->convert_to_delivery_order->save->load; |
Auch abrufbar als: Unified diff
MOdel::Record: Test angepasst