From a39603d88381283a7856f6d73324d20bf530c136 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sat, 20 Mar 2010 10:02:44 +0000 Subject: [PATCH] Works on enhancement of local taxes. New: Prepare database, product tables --- htdocs/install/mysql/migration/2.8.0-2.9.0.sql | 5 +++++ htdocs/install/mysql/tables/llx_product.sql | 3 +++ htdocs/install/mysql/tables/llx_product_price.sql | 3 +++ 3 files changed, 11 insertions(+) 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 acf4a7cc4af..8a2264f5320 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 @@ -74,6 +74,11 @@ alter table llx_facture_fourn_det add column localtax2_tx double(6,3) DEFAULT 0 alter table llx_facture_fourn_det add column total_localtax1 double(24,8) DEFAULT 0 after tva; alter table llx_facture_fourn_det add column total_localtax2 double(24,8) DEFAULT 0 after total_localtax1; +alter table llx_product add column localtax1_tx double(6,3) DEFAULT 0 after tva_tx; +alter table llx_product add column localtax2_tx double(6,3) DEFAULT 0 after localtax1_tx; +alter table llx_product_price add column localtax1_tx double(6,3) DEFAULT 0 after tva_tx; +alter table llx_product_price add column localtax2_tx double(6,3) DEFAULT 0 after localtax1_tx; + alter table llx_product add column hidden tinyint DEFAULT 0; alter table llx_product add column length float DEFAULT NULL after weight_units; diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index fbafc8f8fdc..93ff538503a 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2002-2006 Rodolphe Quiedeville -- Copyright (C) 2008-2010 Laurent Destailleur -- Copyright (C) 2005-2010 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 @@ -38,6 +39,8 @@ create table llx_product price_min_ttc double(24,8) DEFAULT 0, price_base_type varchar(3) DEFAULT 'HT', tva_tx double(6,3), + localtax1_tx double(6,3) DEFAULT 0, + localtax2_tx double(6,3) DEFAULT 0, fk_user_author integer, envente tinyint DEFAULT 1, fk_product_type integer DEFAULT 0, -- Type 0 for regular product, 1 for service diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index 324bf0dadbb..eda64ddcc65 100644 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -1,5 +1,6 @@ -- ============================================================================ -- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- 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 @@ -31,6 +32,8 @@ create table llx_product_price price_min_ttc double(24,8) default NULL, price_base_type varchar(3) DEFAULT 'HT', tva_tx double(6,3) NOT NULL, + localtax1_tx double(6,3) DEFAULT 0, + localtax2_tx double(6,3) DEFAULT 0, fk_user_author integer, envente tinyint DEFAULT 1 )type=innodb;