Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0e4d7177

Von Werner Hahn vor etwa 1 Jahr hinzugefügt

  • ID 0e4d71779bb007392a0f8320477a4761d6e4ce73
  • Vorgänger 75373ee7
  • Nachfolger c3db8032

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

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
192 192
sub action_delete {
193 193
  my ($self) = @_;
194 194

  
195
  my %history = (snumbers => $self->type . '_' . $self->order->number);
196
  my %params = (history => \%history);
197
  SL::Model::Record->delete($self->order,%params);
195
  SL::Model::Record->delete($self->order);
198 196
  flash_later('info', $self->type_data->text("delete"));
199 197

  
200 198
  my @redirect_params = (
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

  
SL/Controller/Reclamation.pm
252 252
  my ($self) = @_;
253 253

  
254 254

  
255
  my %history = (snumbers => 'record_number_' . $self->reclamation->record_number);
256
  my %params = (history => \%history);
257
  SL::Model::Record->delete($self->reclamation, %params);
255
  SL::Model::Record->delete($self->reclamation);
258 256
  flash_later('info', t8('The reclamation has been deleted'));
259 257

  
260 258
  my @redirect_params = (

Auch abrufbar als: Unified diff