Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 17abd93e

Von Werner Hahn vor fast 2 Jahren hinzugefügt

  • ID 17abd93e270deeae2247471389e937f99d8682df
  • Vorgänger 628d3edf
  • Nachfolger d85280af

Reclamation: Workflow Reclamation→Lieferschein ...

neuen DeliveryOrderController benutzen einlagern geht nicht

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
100 100
  $self->action_add;
101 101
}
102 102

  
103
sub action_add_from_reclamation {
104
  my ($self) = @_;
105

  
106
  require SL::DB::Reclamation;
107
  my $reclamation = SL::DB::Reclamation->new(id => $::form->{from_id})->load;
108
  my ($delivery_order, $error) = $reclamation->convert_to_delivery_order();
109
  if($error) {
110
    croak("Error while converting: " . $error);
111
  }
112

  
113
  $self->order($delivery_order);
114

  
115
  $self->action_add;
116
}
117

  
103 118
# edit an existing order
104 119
sub action_edit {
105 120
  my ($self) = @_;
SL/Controller/Reclamation.pm
609 609

  
610 610
# save the reclamation and redirect to the frontend subroutine for a new
611 611
# delivery order
612

  
612 613
sub action_save_and_delivery_order {
613 614
  my ($self) = @_;
614 615

  
615
  my $to_type = $self->reclamation->is_sales ? 'sales_delivery_order'
616
                                             : 'purchase_delivery_order';
616
  my $to_type = $self->reclamation->is_sales ? 'rma_delivery_order'
617
                                             : 'supplier_delivery_order';
617 618
  $self->save_and_redirect_to(
618
    controller => 'do.pl',
619
    action     => 'add_from_reclamation',
619
    controller => 'controller.pl',
620
    action     => 'DeliveryOrder/add_from_reclamation',
620 621
    type       => $to_type,
621 622
    from_id    => $self->reclamation->id,
622 623
  );

Auch abrufbar als: Unified diff