From: Moritz Bunkus Date: Fri, 30 Oct 2020 15:01:34 +0000 (+0100) Subject: Pflichtenhefte: Gültigkeitsdatum in Angeboten auch ohne Zahlungsbedingungen setzen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~649 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bfd5682ab8cad5878260ec2cafcd630dd3c05eff;p=kivitendo-erp.git Pflichtenhefte: Gültigkeitsdatum in Angeboten auch ohne Zahlungsbedingungen setzen --- diff --git a/SL/Controller/RequirementSpecOrder.pm b/SL/Controller/RequirementSpecOrder.pm index a949901f1..398c86a47 100644 --- a/SL/Controller/RequirementSpecOrder.pm +++ b/SL/Controller/RequirementSpecOrder.pm @@ -365,10 +365,13 @@ sub create_order { my @orderitems = map { $self->create_order_item( section => $_, language_id => $customer->language_id) } @{ $params{sections} }; my @add_items = map { $self->create_additional_part_order_item(additional_part => $_, language_id => $customer->language_id) } @{ $params{additional_parts} }; my $employee = SL::DB::Manager::Employee->current; + my $reqdate = !$::form->{quotation} ? undef + : $customer->payment_id ? $customer->payment->calc_date + : DateTime->today_local->next_workday(extra_days => $::instance_conf->get_reqdate_interval)->to_kivitendo; my $order = SL::DB::Order->new( globalproject_id => $self->requirement_spec->project_id, transdate => DateTime->today_local, - reqdate => $::form->{quotation} && $customer->payment_id ? $customer->payment->calc_date : undef, + reqdate => $reqdate, quotation => !!$::form->{quotation}, orderitems => [ @orderitems, @add_items ], customer_id => $customer->id,