2004-06-06 01:57:23 +02:00
|
|
|
|
-- ========================================================================
|
|
|
|
|
|
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2004-07-12 21:57:28 +02:00
|
|
|
|
-- Copyright (C) 2002-2003 Eric Seigne <erics@rycks.com>
|
2004-06-06 01:57:23 +02:00
|
|
|
|
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
|
|
|
|
--
|
|
|
|
|
|
-- 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
|
|
|
|
|
|
-- the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
|
-- (at your option) any later version.
|
|
|
|
|
|
--
|
|
|
|
|
|
-- This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
-- GNU General Public License for more details.
|
|
|
|
|
|
--
|
|
|
|
|
|
-- You should have received a copy of the GNU General Public License
|
|
|
|
|
|
-- along with this program; if not, write to the Free Software
|
|
|
|
|
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
--
|
2004-07-12 21:57:28 +02:00
|
|
|
|
-- $Id$
|
|
|
|
|
|
-- $Source$
|
|
|
|
|
|
--
|
2004-06-06 01:57:23 +02:00
|
|
|
|
-- ========================================================================
|
|
|
|
|
|
|
|
|
|
|
|
create table llx_societe
|
|
|
|
|
|
(
|
2004-10-10 12:25:57 +02:00
|
|
|
|
idp SERIAL PRIMARY KEY,
|
|
|
|
|
|
id varchar(32), -- private id
|
|
|
|
|
|
active smallint DEFAULT 0, --
|
|
|
|
|
|
parent integer DEFAULT 0, --
|
|
|
|
|
|
tms timestamp,
|
|
|
|
|
|
datec timestamp without time zone, -- creation date
|
|
|
|
|
|
datea timestamp without time zone, -- activation date
|
|
|
|
|
|
nom varchar(60), -- company name
|
|
|
|
|
|
address varchar(255), -- company adresse
|
|
|
|
|
|
cp varchar(10), -- zipcode
|
|
|
|
|
|
ville varchar(50), -- town
|
|
|
|
|
|
fk_departement integer DEFAULT 0, --
|
|
|
|
|
|
fk_pays integer DEFAULT 0, --
|
|
|
|
|
|
tel varchar(20), -- phone number
|
|
|
|
|
|
fax varchar(20), -- fax number
|
|
|
|
|
|
url varchar(255), --
|
|
|
|
|
|
fk_secteur integer DEFAULT 0, --
|
|
|
|
|
|
fk_effectif integer DEFAULT 0, --
|
|
|
|
|
|
fk_typent integer DEFAULT 0, --
|
|
|
|
|
|
fk_forme_juridique integer DEFAULT 0, -- forme juridique INSEE
|
|
|
|
|
|
siren varchar(9), --
|
|
|
|
|
|
siret varchar(14), -- numero de siret
|
|
|
|
|
|
ape varchar(4), -- code ape
|
|
|
|
|
|
tva_intra varchar(20), -- tva intracommunautaire
|
|
|
|
|
|
capital real, -- capital de la soci<63>t<EFBFBD>
|
|
|
|
|
|
description text, --
|
|
|
|
|
|
fk_stcomm smallint DEFAULT 0, -- commercial statut
|
|
|
|
|
|
note text, --
|
|
|
|
|
|
services integer DEFAULT 0, --
|
|
|
|
|
|
prefix_comm varchar(5), -- prefix commercial
|
|
|
|
|
|
client integer DEFAULT 0, -- client oui/non
|
|
|
|
|
|
fournisseur smallint DEFAULT 0, -- fournisseur oui/non
|
|
|
|
|
|
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
|
2004-06-06 01:57:23 +02:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
create unique index llx_societe_prefix_comm on llx_societe(prefix_comm);
|