X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5c0d66f1bac1c81ba16077a27f17508bc8bf2375..bee7d33fe47d29afeb4432b222fb1bf90c19e517:/SL/OE.pm?ds=sidebyside 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; }