Revision 8eaf5ab5
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
77 | 77 |
sub action_add { |
78 | 78 |
my ($self) = @_; |
79 | 79 |
|
80 |
$self->order->transdate(DateTime->now_local()); |
|
81 |
my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval : |
|
82 |
$self->type eq sales_order_type() ? $::instance_conf->get_delivery_date_interval : 1; |
|
83 |
|
|
84 |
if ( ($self->type eq sales_order_type() && $::instance_conf->get_deliverydate_on) |
|
85 |
|| ($self->type eq sales_quotation_type() && $::instance_conf->get_reqdate_on) |
|
86 |
&& (!$self->order->reqdate)) { |
|
87 |
$self->order->reqdate(DateTime->today_local->next_workday(extra_days => $extra_days)); |
|
88 |
} |
|
89 |
|
|
80 |
$self->order(SL::Model::Record->update_after_new($self->order, $self->type)); |
|
90 | 81 |
|
91 | 82 |
$self->pre_render(); |
92 | 83 |
|
Auch abrufbar als: Unified diff
Model::Record: update_after_new implementiert