Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cf6fdab1

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID cf6fdab142553e742bc0ca98dade0fb08427fdd4
  • Vorgänger 8244d798
  • Nachfolger 6e7e7ef1

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