X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=ad4c62ea85451043a6d1e061993abb1b9672e16e;hb=ae00d68a24df20631380e9a908ede266e8da7827;hp=ea2cffadf766443ffdb35d75610b41ff30bd5635;hpb=d2af074aaff9dc869be9fa766a796f1642e8ba54;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index ea2cffadf..ad4c62ea8 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -240,9 +240,7 @@ sub order_links { # get customer/vendor $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP"); - # retrieve order/quotation and webdav config - $form->{webdav} = $::instance_conf->get_webdav; - + # retrieve order/quotation my $editing = $form->{id}; OE->retrieve(\%myconfig, \%$form); @@ -567,7 +565,6 @@ sub form_footer { $tpca_reminder = check_transport_cost_reminder_article_number() if $::instance_conf->get_transport_cost_reminder_article_number_id; print $form->parse_html_template("oe/form_footer", { %TMPL_VAR, - webdav => $::instance_conf->get_webdav, tpca_reminder => $tpca_reminder, print_options => print_options(inline => 1), label_edit => $locale->text("Edit the $form->{type}"), @@ -1667,14 +1664,9 @@ sub save_as_new { if ( $form->{reqdate} && $form->{id} ) { my $saved_order = OE->retrieve_simple(id => $form->{id}); if ( $saved_order && $saved_order->{reqdate} eq $form->{reqdate} && $saved_order->{transdate} eq $form->{transdate} ) { - my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : 1; - my $next_workday = DateTime->today_local->add(days => $extra_days); - my $day_of_week = $next_workday->day_of_week; - - $next_workday->add(days => (8 - $day_of_week)) if $day_of_week >= 6; - + my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : 1; + $form->{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days)->to_kivitendo; $form->{transdate} = DateTime->today_local->to_kivitendo; - $form->{reqdate} = $next_workday->to_kivitendo; } }