2
0
forked from Wavyzz/dolibarr

Qual: Optimisation du type en base de donnes de certains champs. Suppression d'un champ obsolete.

This commit is contained in:
Laurent Destailleur
2006-06-04 11:57:38 +00:00
parent a2faa230bc
commit 6ce48c709a
3 changed files with 31 additions and 15 deletions

View File

@@ -67,6 +67,8 @@ class Societe
var $forme_juridique;
var $remise_client;
var $mode_reglement;
var $cond_reglement;
var $client;
var $prospect;
@@ -1243,7 +1245,7 @@ class Societe
/**
* \brief Renvoie la liste des libell<6C>s traduits types actifs de soci<63>t<EFBFBD>s
* \brief Renvoie la liste des libell<6C>s traduits des types actifs de soci<63>t<EFBFBD>s
* \return array tableau des types
*/
function typent_array()

View File

@@ -33,9 +33,24 @@ alter table llx_propal add column remise_absolue real DEFAULT 0 after remise_per
alter table llx_commande add column remise_absolue real DEFAULT 0 after remise_percent;
ALTER TABLE llx_societe ADD mode_reglement INT( 11 ) DEFAULT NULL ;
ALTER TABLE llx_societe ADD cond_reglement INT( 11 ) DEFAULT '1' NOT NULL ;
ALTER TABLE llx_societe ADD tva_assuj tinyint DEFAULT '1';
ALTER TABLE llx_societe add mode_reglement tinyint;
ALTER TABLE llx_societe add cond_reglement tinyint;
ALTER TABLE llx_societe add tva_assuj tinyint DEFAULT '1';
ALTER TABLE llx_societe change active statut tinyint DEFAULT 0;
ALTER TABLE llx_societe modify mode_reglement tinyint NULL;
ALTER TABLE llx_societe modify cond_reglement tinyint NULL;
ALTER TABLE llx_societe modify cond_reglement tinyint NULL;
ALTER TABLE llx_societe modify fk_stcomm tinyint DEFAULT 0;
ALTER TABLE llx_societe modify services tinyint DEFAULT 0;
ALTER TABLE llx_societe modify client tinyint DEFAULT 0;
ALTER TABLE llx_societe modify fournisseur tinyint DEFAULT 0;
ALTER TABLE llx_societe drop column id;
ALTER TABLE llx_societe modify parent integer;
UPDATE llx_societe set parent = null where parent = 0;
alter table llx_product add gencode varchar(255) DEFAULT NULL;
@@ -259,7 +274,7 @@ insert into llx_c_pays (rowid,code,libelle) values (30, 'SG', 'Singapoure');
alter table llx_bank_account add column ref varchar(12) NOT NULL;
rename table llx_accountingsystem_det to llx_accountingaccount;
alter table llx_accountingsystem_det rename to llx_accountingaccount;
insert into llx_rights_def (id, libelle, module, type, bydefault, subperms, perms) values (262,'Consulter tous les clients','commercial','r',1,'voir','client');

View File

@@ -23,9 +23,8 @@
create table llx_societe
(
idp integer AUTO_INCREMENT PRIMARY KEY,
id varchar(32), -- private id
active smallint DEFAULT 0, --
parent integer DEFAULT 0, --
statut tinyint DEFAULT 0, -- statut
parent integer,
tms timestamp,
datec datetime, -- creation date
datea datetime, -- activation date
@@ -52,17 +51,17 @@ create table llx_societe
tva_intra varchar(20), -- tva intracommunautaire
capital real, -- capital de la soci<63>t<EFBFBD>
description text, --
fk_stcomm smallint DEFAULT 0, -- commercial statut
fk_stcomm tinyint DEFAULT 0, -- commercial statut
note text, --
services integer DEFAULT 0, --
services tinyint DEFAULT 0, --
prefix_comm varchar(5), -- prefix commercial
client integer DEFAULT 0, -- client oui/non
fournisseur smallint DEFAULT 0, -- fournisseur oui/non
client tinyint DEFAULT 0, -- client 0/1/2
fournisseur tinyint DEFAULT 0, -- fournisseur 0/1
rubrique varchar(255), -- champ rubrique libre
fk_user_creat integer, -- utilisateur qui a cr<63><72> l'info
fk_user_modif integer, -- utilisateur qui a modifi<66> l'info
remise_client real DEFAULT 0, -- remise syst<73>matique pour le client
mode_reglement integer DEFAULT 0, -- mode de r<>glement
cond_reglement integer DEFAULT 1 NOT NULL, -- condition de r<>glement
tva_assuj tinyint DEFAULT 1 -- assuj<75>ti ou non <20> la TVA
mode_reglement tinyint, -- mode de r<>glement
cond_reglement tinyint, -- condition de r<>glement
tva_assuj tinyint DEFAULT 1 -- assuj<75>ti ou non <20> la TVA
)type=innodb;