Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1fd8f75b

Von Sven Schöling vor fast 2 Jahren hinzugefügt

  • ID 1fd8f75b5b859bd66c99dd26de3ee33bfa184a28
  • Vorgänger 85ad4657
  • Nachfolger e1ba0f96

DeliveryOrder: alte workflow attribute ersetzt durch controller steuerung

Die machen hier keinen Sinn, das ist keine Typ-Information sondern
Nutzerwunsch.

Unterschiede anzeigen:

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
......
1623 1624
}
1624 1625

  
1625 1626
sub workflow_sales_or_request_for_quotation {
1626
  my ($self) = @_;
1627
  my ($self, $destination_type) = @_;
1627 1628

  
1628 1629
  # always save
1629 1630
  $self->save();
1630 1631

  
1631
  my $destination_type = $self->type_data->workflow("to_quotation_type");
1632

  
1633 1632
  my $delivery_order = SL::Model::Record->new_from_workflow($self->order, $destination_type, {});
1634 1633
  $self->order($delivery_order);
1635 1634
  $self->{converted_from_oe_id} = delete $::form->{id};
......
1661 1660
}
1662 1661

  
1663 1662
sub workflow_sales_or_purchase_order {
1664
  my ($self) = @_;
1663
  my ($self, $destination_type) = @_;
1665 1664

  
1666 1665
  # always save
1667 1666
  $self->save();
1668 1667

  
1669
  my $destination_type = $self->type_data->workflow("to_order_type");
1670

  
1671 1668
  # check for direct delivery
1672 1669
  # copy shipto in custom shipto (custom shipto will be copied by new_from() in case)
1673 1670
  my $custom_shipto;

Auch abrufbar als: Unified diff