diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 318e00c15ed..905819dabc5 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1993,6 +1993,12 @@ class Expedition extends CommonObject $error=0; + // Protection. This avoid to move stock later when we should not + if ($this->statut == self::STATUS_CLOSED) + { + return 0; + } + $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut='.self::STATUS_CLOSED; diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index d2879e5bb3c..ff6a1fe03fb 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -285,7 +285,7 @@ CREATE TABLE llx_website_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14),