Revision bfd5682a
Von Moritz Bunkus vor etwa 4 Jahren hinzugefügt
SL/Controller/RequirementSpecOrder.pm | ||
---|---|---|
365 | 365 |
my @orderitems = map { $self->create_order_item( section => $_, language_id => $customer->language_id) } @{ $params{sections} }; |
366 | 366 |
my @add_items = map { $self->create_additional_part_order_item(additional_part => $_, language_id => $customer->language_id) } @{ $params{additional_parts} }; |
367 | 367 |
my $employee = SL::DB::Manager::Employee->current; |
368 |
my $reqdate = !$::form->{quotation} ? undef |
|
369 |
: $customer->payment_id ? $customer->payment->calc_date |
|
370 |
: DateTime->today_local->next_workday(extra_days => $::instance_conf->get_reqdate_interval)->to_kivitendo; |
|
368 | 371 |
my $order = SL::DB::Order->new( |
369 | 372 |
globalproject_id => $self->requirement_spec->project_id, |
370 | 373 |
transdate => DateTime->today_local, |
371 |
reqdate => $::form->{quotation} && $customer->payment_id ? $customer->payment->calc_date : undef,
|
|
374 |
reqdate => $reqdate,
|
|
372 | 375 |
quotation => !!$::form->{quotation}, |
373 | 376 |
orderitems => [ @orderitems, @add_items ], |
374 | 377 |
customer_id => $customer->id, |
Auch abrufbar als: Unified diff
Pflichtenhefte: Gültigkeitsdatum in Angeboten auch ohne Zahlungsbedingungen setzen