X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FOE.pm;h=1b640e37bc39aa6f1ac2393b79085c36698c410e;hb=141b5c0ab7bb381fdf4209e4e9df117e6e5afed7;hp=a517e05d2a3fb8ea24d724569789b9964f19abe8;hpb=3906bb6a765c9f7ced44d7765f6f8913f3f5e482;p=kivitendo-erp.git diff --git a/SL/OE.pm b/SL/OE.pm index a517e05d2..1b640e37b 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -986,7 +986,12 @@ sub _retrieve { if (!$form->{id}) { my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : $form->{type} eq 'sales_order' ? $::instance_conf->get_delivery_date_interval : 1; - $form->{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days)->to_kivitendo; + if ( ($form->{type} eq 'sales_order' && !$::instance_conf->get_deliverydate_on) + || ($form->{type} eq 'sales_quotation' && !$::instance_conf->get_reqdate_on)) { + $form->{reqdate} = ''; + } else { + $form->{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days)->to_kivitendo; + } $form->{transdate} = DateTime->today_local->to_kivitendo; }