]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/oe.pl
Konfigurierbares Angebotsgültigkeits-Intervall hinzugefügt
[mfinanz.git] / bin / mozilla / oe.pl
index 2d64e34562a93776fd566261b4a6a10a5b0a0e8c..3f33c7f75dd4374ebf4b9553b20582d8966d5858 100644 (file)
@@ -240,7 +240,7 @@ sub order_links {
   # get customer/vendor
   $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
 
-  # retrieve order/quotation
+  # retrieve order/quotation and webdav config
   $form->{webdav}   = $::instance_conf->get_webdav;
 
   my $editing = $form->{id};
@@ -1629,6 +1629,10 @@ sub save_as_new {
       my $wday         = (localtime(time))[6];
       my $next_workday = $wday == 5 ? 3 : $wday == 6 ? 2 : 1;
 
+      # if we have a client configured interval for sales quotation, we add this
+      $next_workday   += $::instance_conf->get_reqdate_interval if ($::instance_conf->get_reqdate_interval &&
+                                                                    $form->{type} eq 'sales_quotation'       );
+
       my $query = 'SELECT
                      date(current_date + interval \''. $next_workday .' days\') AS reqdate,
                      date(current_date) AS transdate';