Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e0d2b116

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID e0d2b116bff146abf1411ffa1668a2bf2d81870d
  • Vorgänger 67179a67
  • Nachfolger a1fb0546

Model::Record: update_after_new implementiert

Unterschiede anzeigen:

SL/Controller/Order.pm
78 78
sub action_add {
79 79
  my ($self) = @_;
80 80

  
81
  $self->order->transdate(DateTime->now_local());
82
  my $extra_days = $self->type eq sales_quotation_type()    ? $::instance_conf->get_reqdate_interval       :
83
                   $self->type eq sales_order_type()        ? $::instance_conf->get_delivery_date_interval :
84
                   $self->type eq sales_order_intake_type() ? $::instance_conf->get_delivery_date_interval : 1;
85

  
86
  if (($self->type eq sales_order_intake_type() &&  $::instance_conf->get_deliverydate_on)
87
      || ($self->type eq sales_order_type()     &&  $::instance_conf->get_deliverydate_on)
88
      || ($self->type eq sales_quotation_type() &&  $::instance_conf->get_reqdate_on)
89
      && (!$self->order->reqdate)) {
90
    $self->order->reqdate(DateTime->today_local->next_workday(extra_days => $extra_days));
91
  }
92

  
81
  $self->order(SL::Model::Record->update_after_new($self->order, $self->type));
93 82

  
94 83
  $self->pre_render();
95 84

  

Auch abrufbar als: Unified diff