Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7f1ff4a0

Von Werner Hahn vor etwa 1 Jahr hinzugefügt

  • ID 7f1ff4a0641505593d413765e4a6d40e4b664513
  • Vorgänger dff00e73
  • Nachfolger 3a995f58

Model::Record: _get_snumber in DeliveryOrder, Order und Reclamation eingebunden

Unterschiede anzeigen:

SL/Controller/Order.pm
196 196
sub action_delete {
197 197
  my ($self) = @_;
198 198

  
199
  my %params = (history => { snumbers => $self->get_history_snumbers() });
200
  SL::Model::Record->delete($self->order, %params);
199
  SL::Model::Record->delete($self->order);
201 200
  my $text = $self->type eq sales_order_intake_type()        ? $::locale->text('The order intake has been deleted')
202 201
           : $self->type eq sales_order_type()               ? $::locale->text('The order confirmation has been deleted')
203 202
           : $self->type eq purchase_order_type()            ? $::locale->text('The order has been deleted')
......
2145 2144
                          delete_custom_shipto       => $self->is_custom_shipto_to_delete || $self->order->custom_shipto->is_empty,
2146 2145
                          items_to_delete            => $items_to_delete,
2147 2146
                          objects_to_close           => $objects_to_close,
2148
                          history                    => { snumbers => $self->get_history_snumbers() },
2149 2147
                          link_requirement_specs_linking_to_created_from_objects => \@converted_from_oe_ids,
2150 2148
                          set_project_in_linked_requirement_specs                => 1,
2151 2149
  );
......
2799 2797
  $self->redirect_to(%params, id => $self->order->id);
2800 2798
}
2801 2799

  
2802
sub get_history_snumbers {
2803
  my ($self) = @_;
2804

  
2805
  my $number_type = $self->order->type =~ m{order} ? 'ordnumber' : 'quonumber';
2806
  my $snumbers    = $number_type . '_' . $self->order->$number_type;
2807

  
2808
  return $snumbers;
2809
}
2810

  
2811 2800
sub save_history {
2812 2801
  my ($self, $addition) = @_;
2813 2802

  

Auch abrufbar als: Unified diff