From 95b56f05183027eaa3ae6136be5c28e803169800 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 17 Dec 2019 12:19:35 +0100 Subject: [PATCH 1/2] Update 6.0.0-7.0.0.sql timestamp NOT NULL can cause SQL error. --- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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), From 3e19702e392ee26a6dfbf36e700fd474805f2736 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Tue, 17 Dec 2019 18:05:59 +0100 Subject: [PATCH 2/2] Fix prevent double action on shipment close --- htdocs/expedition/class/expedition.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index ea6e003d326..81c7cb55fc4 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1902,6 +1902,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;