From 96f1f41c832e633b2379caf22c1bb5578eb38b6e Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 18 Mar 2010 22:03:01 +0000 Subject: [PATCH] Qual: Uniformize table structure --- htdocs/install/mysql/migration/2.8.0-2.9.0.sql | 2 ++ htdocs/install/mysql/tables/llx_facture.sql | 2 +- htdocs/install/mysql/tables/llx_facture_rec.sql | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) 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 23c2245b31a..acf4a7cc4af 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 @@ -90,6 +90,7 @@ ALTER TABLE llx_product_stock add column location varchar(32); ALTER TABLE llx_facture MODIFY tva double(24,8) DEFAULT 0; ALTER TABLE llx_facture MODIFY total double(24,8) DEFAULT 0; ALTER TABLE llx_facture MODIFY total_ttc double(24,8) DEFAULT 0; +ALTER TABLE llx_facture MODIFY amount double(24,8) DEFAULT 0 NOT NULL; ALTER TABLE llx_facturedet MODIFY tva_tx double(6,3); ALTER TABLE llx_facturedet MODIFY subprice double(24,8); @@ -101,6 +102,7 @@ ALTER TABLE llx_facturedet MODIFY total_ttc double(24,8); ALTER TABLE llx_facture_rec MODIFY tva double(24,8) DEFAULT 0; ALTER TABLE llx_facture_rec MODIFY total double(24,8) DEFAULT 0; ALTER TABLE llx_facture_rec MODIFY total_ttc double(24,8) DEFAULT 0; +ALTER TABLE llx_facture_rec MODIFY amount double(24,8) DEFAULT 0 NOT NULL; ALTER TABLE llx_facturedet_rec MODIFY tva_tx double(6,3); ALTER TABLE llx_facturedet_rec MODIFY subprice double(24,8); diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 59a74737a36..ecdeebb8091 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -36,7 +36,7 @@ create table llx_facture date_valid date, -- date de validation tms timestamp, -- date creation/modification paye smallint DEFAULT 0 NOT NULL, - amount real DEFAULT 0 NOT NULL, + amount double(24,8) DEFAULT 0 NOT NULL, remise_percent real DEFAULT 0, -- remise relative remise_absolue real DEFAULT 0, -- remise absolue remise real DEFAULT 0, -- remise totale calculee diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index ac4e2f6c8de..ca578ee2014 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -29,15 +29,15 @@ create table llx_facture_rec fk_soc integer NOT NULL, datec datetime, -- date de creation - amount real DEFAULT 0 NOT NULL, + amount double(24,8) DEFAULT 0 NOT NULL, remise real DEFAULT 0, remise_percent real DEFAULT 0, remise_absolue real DEFAULT 0, - tva real DEFAULT 0, + tva double(24,8) DEFAULT 0, localtax1 double(24,8) DEFAULT 0, -- amount localtax1 localtax2 double(24,8) DEFAULT 0, -- amount localtax2 - total real DEFAULT 0, - total_ttc real DEFAULT 0, + total double(24,8) DEFAULT 0, + total_ttc double(24,8) DEFAULT 0, fk_user_author integer, -- createur fk_projet integer, -- projet auquel est associe la facture