From 1f11eac7024967d4dcb313875067d245dbb57da2 Mon Sep 17 00:00:00 2001 From: Juanjo Menent <jmenent@2byte.es> Date: Sun, 7 Mar 2010 10:00:05 +0000 Subject: [PATCH] Works on enhancement of local taxes. New: Prepare database, provider invoice tables --- htdocs/install/mysql/migration/2.8.0-2.9.0.sql | 7 +++++++ htdocs/install/mysql/tables/llx_facture_fourn.sql | 3 +++ htdocs/install/mysql/tables/llx_facture_fourn_det.sql | 5 +++++ 3 files changed, 15 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 207b46981b0..7adf0c9a495 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 @@ -67,4 +67,11 @@ alter table llx_commande_fournisseurdet add column localtax2_tx double(6,3) DEFA alter table llx_commande_fournisseurdet add column total_localtax1 double(24,8) DEFAULT 0 after total_tva; alter table llx_commande_fournisseurdet add column total_localtax2 double(24,8) DEFAULT 0 after total_localtax1; +alter table llx_facture_fourn add column localtax1 double(24,8) DEFAULT 0 after tva; +alter table llx_facture_fourn add column localtax2 double(24,8) DEFAULT 0 after localtax1; +alter table llx_facture_fourn_det add column localtax1_tx double(6,3) DEFAULT 0 after tva_tx; +alter table llx_facture_fourn_det add column localtax2_tx double(6,3) DEFAULT 0 after localtax1_tx; +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 hidden tinyint DEFAULT 0; diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index 1a9e6abe853..9275af5a973 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2007-2009 Regis Houssin <regis@dolibarr.fr> +-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> -- -- 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 @@ -40,6 +41,8 @@ create table llx_facture_fourn close_note varchar(128), -- Commentaire cloture sans paiement complet tva double(24,8) DEFAULT 0, + localtax1 double(24,8) DEFAULT 0, + localtax2 double(24,8) DEFAULT 0, total double(24,8) DEFAULT 0, total_ht double(24,8) DEFAULT 0, total_tva double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql index 700b3162e6c..329b37cc8e2 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql @@ -1,6 +1,7 @@ -- =================================================================== -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net> +-- Copyright (C) 2010 juanjo Menent <jmenent@2byte.es> -- -- 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,8 +32,12 @@ create table llx_facture_fourn_det pu_ttc double(24,8), -- unit price with tax qty real, -- quantity of product/service tva_tx double(6,3), -- TVA taux product/service + localtax1_tx double(6,3) DEFAULT 0, -- tax local tax 1 + localtax2_tx double(6,3) DEFAULT 0, -- tax local tax 2 total_ht double(24,8), -- Total line price of product excluding tax tva double(24,8), -- Total TVA of line + total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 for total quantity of line + total_localtax2 double(24,8) DEFAULT 0, -- total LocalTax2 for total quantity of line total_ttc double(24,8), -- Total line with tax product_type integer DEFAULT 0, date_start datetime DEFAULT NULL, -- date debut si service -- GitLab