From bd780a8c5113a34ee49dc7c59bcdfa7d46216b56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 26 Nov 2020 15:29:18 +0100 Subject: [PATCH] FIX Warning on late purchase order delivery --- .travis.yml | 50 ++++--------------- .../class/fournisseur.commande.class.php | 2 +- 2 files changed, 12 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 082847d8c30..3a89572148b 100644 --- a/.travis.yml +++ b/.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 diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 21399b7d674..eb5a2e26de0 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/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); }