瀏覽代碼

FIX Warning on late purchase order delivery

Laurent Destailleur 4 年之前
父節點
當前提交
bd780a8c51
共有 2 個文件被更改,包括 12 次插入40 次删除
  1. 11 39
      .travis.yml
  2. 1 1
      htdocs/fourn/class/fournisseur.commande.class.php

+ 11 - 39
.travis.yml

@@ -31,53 +31,25 @@ addons:
     # We need pgloader for import mysql database into pgsql
     - pgloader
 
-php:
-- '5.6'
-- '7.0'
-- '7.1'
-- '7.2'
-- '7.3'
-- '7.4'
-- nightly
-
 env:
   global:
   # Set to true for very verbose output
   - DEBUG=false
-  jobs:
-  # MariaDB overrides MySQL installation so it's not possible to test both yet
-  #- DB=mariadb
-  - DB=mysql
-  - DB=postgresql
-  # See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
-  #- WS=apache
-  # See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
-  #- WS=nginx
 
 jobs:
   fast_finish: true
   allow_failures:
   - php: nightly
-  # We exclude some combinations not usefull to save Travis CPU
-  exclude:
-  - php: '7.0'
-    env: DB=mysql
-  - php: '7.1'
-    env: DB=mysql
-  - php: '7.2'
-    env: DB=mysql
-  - php: '7.3'
-    env: DB=mysql
-  - php: '7.0'
-    env: DB=postgresql
-  - php: '7.1'
-    env: DB=postgresql
-  - php: '7.2'
-    env: DB=postgresql
-  - php: '7.3'
-    env: DB=postgresql
-  - php: nightly
-    env: DB=postgresql
+  include:
+    - if: type = push
+      php: '5.6'
+      env: DB=postgresql
+    - if: type = pull_request OR type = push
+      php: '7.4'
+      env: DB=mysql
+    - if: type = push AND branch = develop
+      php: nightly 
+      env: DB=mysql
 
 notifications:
   email:
@@ -110,8 +82,8 @@ install:
   echo "Updating Composer"
   rm $TRAVIS_BUILD_DIR/composer.json
   rm $TRAVIS_BUILD_DIR/composer.lock
+  composer -V
   composer self-update
-  # To have composer making parallel downloads
   composer -n init
   composer -n config vendor-dir htdocs/includes
   composer -n config -g vendor-dir htdocs/includes

+ 1 - 1
htdocs/fourn/class/fournisseur.commande.class.php

@@ -3175,7 +3175,7 @@ class CommandeFournisseur extends CommonOrder
         if (empty($this->date_delivery) && !empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility
 
         $now = dol_now();
-        $date_to_test = empty($this->date_livraison) ? $this->date_commande : $this->date_livraison;
+        $date_to_test = empty($this->date_delivery) ? $this->date_commande : $this->date_delivery;
 
         return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
     }