diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 659cea69551..d8a0a339881 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2252,7 +2252,7 @@ class Expedition extends CommonObject $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET fk_statut = ".self::STATUS_CLOSED; + $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET fk_statut = ".self::STATUS_CLOSED.", date_expedition = '".$this->db->escape($this->db->idate(dol_now()))."'"; $sql .= " WHERE rowid = ".((int) $this->id)." AND fk_statut > 0"; $resql = $this->db->query($sql); diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 1f22c2e1e55..2c9c0351916 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -114,3 +114,6 @@ create table llx_paymentexpensereport_expensereport ALTER TABLE llx_contrat ADD COLUMN denormalized_lower_planned_end_date datetime; + +-- Missing field vat_reverse_charge with constant MAIN_COMPANY_PERENTITY_SHARED +ALTER TABLE llx_societe_perentity ADD COLUMN vat_reverse_charge tinyint DEFAULT 0; diff --git a/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql b/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql index 800d4a10679..78943d84635 100644 --- a/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql +++ b/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql @@ -1,5 +1,6 @@ -- ======================================================================== --- Copyright (C) 2021 Open-Dsi +-- Copyright (C) 2021 Open-Dsi +-- Copyright (C) 2024 Alexandre Spangaro -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -18,11 +19,12 @@ create table llx_societe_perentity ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_soc integer, - entity integer DEFAULT 1 NOT NULL, -- multi company id - accountancy_code_customer varchar(24), -- customer accountancy auxiliary account - accountancy_code_supplier varchar(24), -- supplier accountancy auxiliary account - accountancy_code_sell varchar(32), -- Selling accountancy code - accountancy_code_buy varchar(32) -- Buying accountancy code + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_soc integer, + entity integer DEFAULT 1 NOT NULL, -- multi company id + accountancy_code_customer varchar(24), -- customer accountancy auxiliary account + accountancy_code_supplier varchar(24), -- supplier accountancy auxiliary account + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_buy varchar(32), -- Buying accountancy code + vat_reverse_charge tinyint DEFAULT 0 -- VAT reverse charge )ENGINE=innodb;