diff --git a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql index 38f47661e01..5ec2e0381e7 100755 --- a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql +++ b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql @@ -53,3 +53,9 @@ alter table llx_propaldet add column localtax2_tx double(6,3) DEFAULT 0 after lo alter table llx_propaldet add column total_localtax1 double(24,8) DEFAULT 0 after total_tva; alter table llx_propaldet add column total_localtax2 double(24,8) DEFAULT 0 after total_localtax1; +alter table llx_commande add column localtax1 double(24,8) DEFAULT 0 after tva; +alter table llx_commande add column localtax2 double(24,8) DEFAULT 0 after localtax1; +alter table llx_commandedet add column localtax1_tx double(6,3) DEFAULT 0 after tva_tx; +alter table llx_commandedet add column localtax2_tx double(6,3) DEFAULT 0 after localtax1_tx; +alter table llx_commandedet add column total_localtax1 double(24,8) DEFAULT 0 after total_tva; +alter table llx_commandedet add column total_localtax2 double(24,8) DEFAULT 0 after total_localtax1; diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index 354c32f45f5..2a17e2b0b76 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -1,6 +1,7 @@ -- =================================================================== -- Copyright (C) 2003 Rodolphe Quiedeville -- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2010 Juanjo Menent -- -- 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 @@ -43,6 +44,8 @@ create table llx_commande remise_absolue real default 0, remise real default 0, tva double(24,8) default 0, + localtax1 double(24,8) default 0, -- total localtax1 + localtax2 double(24,8) default 0, -- total localtax2 total_ht double(24,8) default 0, total_ttc double(24,8) default 0, note text, diff --git a/htdocs/install/mysql/tables/llx_commandedet.sql b/htdocs/install/mysql/tables/llx_commandedet.sql index 52317c12306..9b177a7f9a3 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.sql @@ -1,6 +1,7 @@ -- =================================================================== -- Copyright (C) 2003 Rodolphe Quiedeville -- Copyright (C) 2006-2009 Laurent Destailleur +-- Copyright (C) 2010 Juanjo Menent -- -- 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 @@ -26,6 +27,8 @@ create table llx_commandedet fk_product integer, description text, tva_tx double(6,3), -- vat rate + localtax1_tx double(6,3), -- localtax1 rate + localtax2_tx double(6,3), -- localtax2 rate qty real, -- quantity remise_percent real DEFAULT 0, -- pourcentage de remise remise real DEFAULT 0, -- montant de la remise @@ -34,6 +37,8 @@ create table llx_commandedet subprice double(24,8) DEFAULT 0, -- prix unitaire total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantite et incluant remise ligne et globale total_tva double(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantite et incluant remise ligne et globale + total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 + total_localtax2 double(24,8) DEFAULT 0, -- Total LocalTax2 total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantite et incluant remise ligne et globale product_type integer DEFAULT 0, date_start datetime DEFAULT NULL, -- date debut si service