Revision 2e0bd0f9
Von Sven Schöling vor etwa 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
35 | 35 |
use SL::DB::Helper::TypeDataProxy; |
36 | 36 |
use SL::DB::DeliveryOrder; |
37 | 37 |
use SL::DB::DeliveryOrder::TypeData qw(:types); |
38 |
use SL::DB::Order::TypeData qw(:types); |
|
38 | 39 |
use SL::DB::Manager::DeliveryOrderItem; |
39 | 40 |
use SL::DB::DeliveryOrderItemsStock; |
40 | 41 |
use SL::Model::Record; |
... | ... | |
530 | 531 |
|
531 | 532 |
# workflow from sales order to sales quotation |
532 | 533 |
sub action_sales_quotation { |
533 |
$_[0]->workflow_sales_or_request_for_quotation(); |
|
534 |
$_[0]->workflow_sales_or_request_for_quotation(SALES_QUOTATION_TYPE());
|
|
534 | 535 |
} |
535 | 536 |
|
536 | 537 |
# workflow from sales order to sales quotation |
537 | 538 |
sub action_request_for_quotation { |
538 |
$_[0]->workflow_sales_or_request_for_quotation(); |
|
539 |
$_[0]->workflow_sales_or_request_for_quotation(REQUEST_QUOTATION_TYPE());
|
|
539 | 540 |
} |
540 | 541 |
|
541 | 542 |
# workflow from sales quotation to sales order |
542 | 543 |
sub action_sales_order { |
543 |
$_[0]->workflow_sales_or_purchase_order(); |
|
544 |
$_[0]->workflow_sales_or_purchase_order(SALES_ORDER_TYPE());
|
|
544 | 545 |
} |
545 | 546 |
|
546 | 547 |
# workflow from rfq to purchase order |
547 | 548 |
sub action_purchase_order { |
548 |
$_[0]->workflow_sales_or_purchase_order(); |
|
549 |
$_[0]->workflow_sales_or_purchase_order(PURCHASE_ORDER_TYPE());
|
|
549 | 550 |
} |
550 | 551 |
|
551 | 552 |
# workflow from purchase order to ap transaction |
... | ... | |
1627 | 1628 |
} |
1628 | 1629 |
|
1629 | 1630 |
sub workflow_sales_or_request_for_quotation { |
1630 |
my ($self) = @_; |
|
1631 |
my ($self, $destination_type) = @_;
|
|
1631 | 1632 |
|
1632 | 1633 |
# always save |
1633 | 1634 |
$self->save(); |
1634 | 1635 |
|
1635 |
my $destination_type = $self->type_data->workflow("to_quotation_type"); |
|
1636 |
|
|
1637 | 1636 |
my $delivery_order = SL::Model::Record->new_from_workflow($self->order, $destination_type, {}); |
1638 | 1637 |
$self->order($delivery_order); |
1639 | 1638 |
$self->{converted_from_oe_id} = delete $::form->{id}; |
... | ... | |
1665 | 1664 |
} |
1666 | 1665 |
|
1667 | 1666 |
sub workflow_sales_or_purchase_order { |
1668 |
my ($self) = @_; |
|
1667 |
my ($self, $destination_type) = @_;
|
|
1669 | 1668 |
|
1670 | 1669 |
# always save |
1671 | 1670 |
$self->save(); |
1672 | 1671 |
|
1673 |
my $destination_type = $self->type_data->workflow("to_order_type"); |
|
1674 |
|
|
1675 | 1672 |
# check for direct delivery |
1676 | 1673 |
# copy shipto in custom shipto (custom shipto will be copied by new_from() in case) |
1677 | 1674 |
my $custom_shipto; |
Auch abrufbar als: Unified diff
DeliveryOrder: alte workflow attribute ersetzt durch controller steuerung
Die machen hier keinen Sinn, das ist keine Typ-Information sondern
Nutzerwunsch.