Revision 35b2c40b
Von Werner Hahn vor mehr als 2 Jahren hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
207 | 207 |
$record_args{cp_id} = $source->contact_id; |
208 | 208 |
$record_args{cusordnumber} = $source->cv_record_number; |
209 | 209 |
$record_args{is_sales} = $source->is_sales; |
210 |
$record_args{type} = $source->is_sales ? 'rma_delivery_order' : 'supplier_delivery_order'; |
|
210 | 211 |
# }}} for vim folds |
211 | 212 |
} |
212 | 213 |
|
... | ... | |
230 | 231 |
$delivery_order->assign_attributes(%{ $params{attributes} }) if $params{attributes}; |
231 | 232 |
|
232 | 233 |
my $items = delete($params{items}) || $source->items_sorted; |
233 |
my @items = $delivery_order->is_type(SUPPLIER_DELIVERY_ORDER_TYPE) ? () |
|
234 |
my @items = ( $delivery_order->is_type(SUPPLIER_DELIVERY_ORDER_TYPE) && ref($source) ne 'SL::DB::Reclamation' ) ? |
|
235 |
() |
|
234 | 236 |
: map { SL::DB::DeliveryOrderItem->new_from($_) } @{ $items }; |
235 | 237 |
|
236 | 238 |
@items = grep { $params{item_filter}->($_) } @items if $params{item_filter}; |
Auch abrufbar als: Unified diff
DeliveryOrderType richtig setzen