diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index df1c0cb64c4..f5757a39754 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -51,3 +51,10 @@ ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32); ALTER TABLE llx_bank_account ADD COLUMN accountancy_journal varchar(3) DEFAULT NULL AFTER account_number; ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date; + +-- Localtaxes by thirds +ALTER TABLE llx_c_tva MODIFY COLUMN localtax1 varchar(10); +ALTER TABLE llx_c_tva MODIFY COLUMN localtax2 varchar(10); +ALTER TABLE llx_localtax ADD COLUMN localtaxtype tinyint(4) after entity; +ALTER TABLE llx_societe ADD COLUMN localtax1_value double(6,3) after localtax1_assuj; +ALTER TABLE llx_societe ADD COLUMN localtax2_value double(6,3) after localtax2_assuj; diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index e2de4c3b5ef..2a0b275ce96 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -1,6 +1,6 @@ -- ======================================================================== -- Copyright (C) 2005 Laurent Destailleur --- Copyright (C) 2010 Juanjo Menent +-- Copyright (C) 2010-2014 Juanjo Menent -- Copyright (C) 2011-2012 Alexandre Spangaro -- -- This program is free software; you can redistribute it and/or modify @@ -23,10 +23,10 @@ create table llx_c_tva rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, fk_pays integer NOT NULL, taux double NOT NULL, - localtax1 double NOT NULL DEFAULT 0, + localtax1 varchar(10) NOT NULL DEFAULT '0', localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2 double NOT NULL DEFAULT 0, - localtax2_type varchar(10) NOT NULL DEFAULT '0', + localtax2 varchar(10) NOT NULL DEFAULT '0', + localtax2_type varchar(10) NOT NULL DEFAULT '0', recuperableonly integer NOT NULL DEFAULT 0, note varchar(128), active tinyint DEFAULT 1 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql index c7ca3ca44f6..bc646ffc245 100644 --- a/htdocs/install/mysql/tables/llx_localtax.sql +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -1,6 +1,6 @@ -- =================================================================== --- Copyright (C) 2011 Juanjo Menent --- Copyright (C) 2011 Regis Houssin +-- Copyright (C) 2011-2014 Juanjo Menent +-- Copyright (C) 2011 Regis Houssin -- -- 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 @@ -21,6 +21,7 @@ create table llx_localtax ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, + localtaxtype tinyint(4), tms timestamp, datep date, -- date of payment datev date, -- date of value diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index e2c08d246be..b7f91c2d1ef 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -81,7 +81,9 @@ create table llx_societe cond_reglement_supplier tinyint, -- condition de reglement fournisseur tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1 + localtax1_value double(6,3), localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2 + localtax2_value double(6,3), barcode varchar(255), -- barcode fk_barcode_type integer NULL DEFAULT 0, -- barcode type price_level integer NULL, -- level of price for multiprices