FIX Warning on late purchase order delivery
This commit is contained in:
parent
168e35a035
commit
bd780a8c51
46
.travis.yml
46
.travis.yml
@ -31,53 +31,25 @@ addons:
|
|||||||
# We need pgloader for import mysql database into pgsql
|
# We need pgloader for import mysql database into pgsql
|
||||||
- pgloader
|
- pgloader
|
||||||
|
|
||||||
php:
|
|
||||||
- '5.6'
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
- '7.3'
|
|
||||||
- '7.4'
|
|
||||||
- nightly
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# Set to true for very verbose output
|
# Set to true for very verbose output
|
||||||
- DEBUG=false
|
- 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:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
# We exclude some combinations not usefull to save Travis CPU
|
include:
|
||||||
exclude:
|
- if: type = push
|
||||||
- php: '7.0'
|
php: '5.6'
|
||||||
|
env: DB=postgresql
|
||||||
|
- if: type = pull_request OR type = push
|
||||||
|
php: '7.4'
|
||||||
env: DB=mysql
|
env: DB=mysql
|
||||||
- php: '7.1'
|
- if: type = push AND branch = develop
|
||||||
|
php: nightly
|
||||||
env: DB=mysql
|
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
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
@ -110,8 +82,8 @@ install:
|
|||||||
echo "Updating Composer"
|
echo "Updating Composer"
|
||||||
rm $TRAVIS_BUILD_DIR/composer.json
|
rm $TRAVIS_BUILD_DIR/composer.json
|
||||||
rm $TRAVIS_BUILD_DIR/composer.lock
|
rm $TRAVIS_BUILD_DIR/composer.lock
|
||||||
|
composer -V
|
||||||
composer self-update
|
composer self-update
|
||||||
# To have composer making parallel downloads
|
|
||||||
composer -n init
|
composer -n init
|
||||||
composer -n config vendor-dir htdocs/includes
|
composer -n config vendor-dir htdocs/includes
|
||||||
composer -n config -g vendor-dir htdocs/includes
|
composer -n config -g vendor-dir htdocs/includes
|
||||||
|
|||||||
@ -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
|
if (empty($this->date_delivery) && !empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility
|
||||||
|
|
||||||
$now = dol_now();
|
$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);
|
return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user