/[dolibarr]/dolibarr/mysql/migration/1.1.0-1.2.0-RC1.sql
ViewVC logotype

Contents of /dolibarr/mysql/migration/1.1.0-1.2.0-RC1.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.96 - (show annotations) (download)
Sun Jan 9 00:57:33 2005 UTC (19 years, 3 months ago) by eldy
Branch: MAIN
Changes since 1.95: +15 -1 lines
Fix: La table des mouvements de stock n'était pas dans le script de migration

1 -- $Revision: 1.95 $
2 --
3 -- Attention à l ordre des requetes
4 -- ce fichier doit être chargé sur une version 1.1.0
5 -- sans AUCUNE erreur ni warning
6 -- ;
7
8 alter table llx_user_rights add rowid integer AUTO_INCREMENT PRIMARY KEY;
9 alter table llx_facture add fk_mode_reglement integer after fk_cond_reglement ;
10
11 alter table llx_paiement add statut smallint DEFAULT 0 NOT NULL ;
12 alter table llx_facturedet add fk_export_compta integer DEFAULT 0 NOT NULL ;
13 alter table llx_paiement add fk_export_compta integer DEFAULT 0 NOT NULL ;
14
15 alter table llx_rights_def add perms varchar(255) after module;
16 alter table llx_rights_def add subperms varchar(255) after perms;
17
18 alter table llx_facturedet add fk_code_ventilation integer NOT NULL DEFAULT 0;
19
20
21 alter table llx_contrat add fk_facturedet integer NOT NULL default 0 after fk_facture;
22 alter table llx_contrat change fk_user_cloture fk_user_cloture integer;
23 alter table llx_contrat change fk_user_mise_en_service fk_user_mise_en_service integer;
24 alter table llx_contrat add datec datetime after tms;
25 alter table llx_contrat add date_contrat datetime after datec;
26 alter table llx_contrat change enservice statut SMALLINT(6) DEFAULT 0;
27 alter table llx_contrat add fk_commercial_signature integer NOT NULL after fk_soc;
28 alter table llx_contrat add fk_commercial_suivi integer NOT NULL after fk_commercial_signature;
29
30 alter table llx_facturedet add date_start date;
31 alter table llx_facturedet add date_end date;
32
33 alter table llx_user add egroupware_id integer;
34 alter table llx_societe add code_client varchar(15) after nom;
35 alter table llx_societe add code_compta varchar(15) after code_client;
36 alter table llx_societe add siret varchar(14) after siren;
37 alter table llx_societe add ape varchar(4) after siret;
38 alter table llx_societe add tva_intra varchar(20) after ape;
39 alter table llx_societe add capital real after tva_intra;
40 alter table llx_societe add rubrique varchar(255);
41 alter table llx_societe add remise_client real default 0;
42
43 insert into llx_const (name, value, type, note, visible) values ('ADHERENT_MAIL_REQUIRED','1','yesno','Le mail est obligatoire pour créer un adhérent',0);
44
45 alter table llx_societe add fk_forme_juridique integer default 0 after fk_typent;
46
47 alter table llx_societe add fk_departement integer default 0 after ville;
48
49 alter table llx_societe add fk_user_creat integer;
50 alter table llx_societe add fk_user_modif integer;
51
52 alter table llx_socpeople add civilite varchar(6);
53 alter table llx_socpeople add fk_user_modif integer;
54
55
56 alter table llx_paiement add tms timestamp after datec;
57 alter table llx_paiement add fk_user_creat integer;
58 alter table llx_paiement add fk_user_modif integer;
59
60 alter table llx_propal add fin_validite datetime ;
61
62 alter table llx_entrepot add statut tinyint default 1;
63
64 alter table llx_product add stock_propale integer default 0;
65 alter table llx_product add stock_commande integer default 0;
66 alter table llx_product add seuil_stock_alerte integer default 0;
67
68 alter table llx_groupart add description text after groupart ;
69
70 alter table llx_socpeople add phone_perso varchar(30) after phone ;
71 alter table llx_socpeople add phone_mobile varchar(30) after phone_perso ;
72 alter table llx_socpeople add jabberid varchar(255) after email ;
73 alter table llx_socpeople add birthday date after address ;
74 alter table llx_socpeople add tms timestamp after datec ;
75
76 alter table llx_facture_fourn drop index facnumber ;
77 alter table llx_facture_fourn add unique index (facnumber, fk_soc) ;
78
79 alter table llx_bank_account modify bank varchar(60);
80 alter table llx_bank_account modify domiciliation varchar(255);
81 alter table llx_bank_account add proprio varchar(60) after domiciliation ;
82 alter table llx_bank_account add adresse_proprio varchar(255) after proprio ;
83 alter table llx_bank_account add account_number varchar(8) after clos ;
84 update llx_bank_account set account_number = '51' where account_number is null;
85
86 alter table llx_paiement add fk_bank integer NOT NULL after note ;
87 alter table llx_paiementfourn add fk_bank integer NOT NULL after note ;
88
89
90 alter table c_actioncomm rename llx_c_actioncomm ;
91 alter table c_effectif rename llx_c_effectif ;
92 alter table c_paiement rename llx_c_paiement ;
93 alter table c_pays rename llx_c_pays ;
94 alter table c_propalst rename llx_c_propalst ;
95 alter table c_stcomm rename llx_c_stcomm ;
96 alter table c_typent rename llx_c_typent ;
97
98
99
100 alter table llx_c_actioncomm add type varchar(10) not null default 'system' after id;
101 alter table llx_c_actioncomm add active tinyint default 1 NOT NULL after libelle;
102
103 alter table llx_c_paiement add code varchar(6) after id;
104
105
106 create table llx_stock_mouvement
107 (
108 rowid integer AUTO_INCREMENT PRIMARY KEY,
109 tms timestamp,
110 datem datetime,
111 fk_product integer NOT NULL,
112 fk_entrepot integer NOT NULL,
113 value integer,
114 type_mouvement smallint,
115 fk_user_author integer,
116 key(fk_product),
117 key(fk_entrepot)
118 )type=innodb;
119
120
121 create table llx_birthday_alert
122 (
123 rowid integer AUTO_INCREMENT PRIMARY KEY,
124 fk_contact integer,
125 fk_user integer
126 )type=innodb;
127
128
129 alter table llx_birthday_alert rename llx_user_alert ;
130 alter table llx_user_alert add type integer after rowid;
131 update llx_user_alert set type=1 where type is null;
132
133
134 create table llx_co_fa
135 (
136 rowid integer AUTO_INCREMENT PRIMARY KEY,
137 fk_commande integer NOT NULL,
138 fk_facture integer NOT NULL,
139
140 key(fk_commande),
141 key(fk_facture)
142 )type=innodb;
143
144
145 create table llx_co_pr
146 (
147 rowid integer AUTO_INCREMENT PRIMARY KEY,
148 fk_commande integer,
149 fk_propale integer
150 )type=innodb;
151
152
153 create table llx_paiement_facture
154 (
155 rowid integer AUTO_INCREMENT PRIMARY KEY,
156 fk_paiement integer,
157 fk_facture integer,
158 amount real default 0,
159
160 key (fk_paiement),
161 key( fk_facture)
162 )type=innodb;
163
164
165 insert into llx_const(name, value, type, note, visible) values ('MAIN_UPLOAD_DOC','1','chaine','Authorise l\'upload de document',1);
166 insert into llx_const(name, value, type, note, visible) values ('MAIN_SEARCHFORM_PRODUITSERVICE','1','yesno','Affichage formulaire de recherche des Produits et Services dans la barre de gauche',0);
167 delete from llx_const where name = 'COMPTA_BANK_FACTURES';
168
169 update llx_bank set fk_type = 'VAD' where fk_type = 'WWW';
170
171 alter table llx_socpeople change civilite civilite varchar(6);
172
173 update llx_paiement set author = null where author = '';
174
175 create table llx_paiementcharge
176 (
177 rowid integer AUTO_INCREMENT PRIMARY KEY,
178 fk_charge integer,
179 datec datetime,
180 tms timestamp,
181 datep datetime,
182 amount real default 0,
183 fk_typepaiement integer NOT NULL,
184 num_paiement varchar(50),
185 note text,
186 fk_bank integer NOT NULL,
187 fk_user_creat integer,
188 fk_user_modif integer
189
190 )type=innodb;
191
192
193 update llx_const set visible=0 where name like 'ADHERENT%';
194 update llx_const set visible=0 where name like 'PROPALE_ADDON%';
195
196 create table llx_user_param
197 (
198 fk_user integer,
199 page varchar(255),
200 param varchar(255),
201 value varchar(255),
202 UNIQUE (fk_user,page,param)
203 )type=innodb;
204
205 create table llx_cash_account
206 (
207 rowid integer AUTO_INCREMENT PRIMARY KEY,
208 datec datetime,
209 tms timestamp,
210 label varchar(30),
211 courant smallint default 0 not null,
212 clos smallint default 0 not null,
213 account_number varchar(8)
214 )type=innodb;
215
216 create table llx_cash
217 (
218 rowid integer AUTO_INCREMENT PRIMARY KEY,
219 datec datetime,
220 dateo date NOT NULL,
221 amount real NOT NULL default 0,
222 label varchar(255),
223 fk_account integer,
224 fk_user_author integer,
225 fk_type varchar(4),
226 note text
227 )type=innodb;
228
229
230 update llx_bank set datev=dateo where datev is null;
231
232 update llx_chargesociales set periode=date_ech where periode is null or periode = '0000-00-00';
233
234
235
236 create table llx_societe_remise
237 (
238 rowid integer AUTO_INCREMENT PRIMARY KEY,
239 fk_soc integer NOT NULL,
240 tms timestamp,
241 datec datetime,
242 fk_user_author integer,
243 remise_client real default 0,
244 note text
245
246 )type=innodb;
247
248
249 create table llx_societe_remise_except
250 (
251 rowid integer AUTO_INCREMENT PRIMARY KEY,
252 fk_soc integer NOT NULL,
253 datec datetime,
254 amount_ht real NOT NULL,
255 fk_user integer NOT NULL,
256 fk_facture integer,
257 description text
258
259 )type=innodb;
260
261 create table llx_contact_facture
262 (
263 idp integer AUTO_INCREMENT PRIMARY KEY,
264 fk_soc integer NOT NULL,
265 fk_contact integer NOT NULL,
266
267 UNIQUE (fk_soc, fk_contact)
268 )type=innodb;
269
270
271 --
272 --
273 --
274 --
275
276 create table llx_so_gr
277 (
278 rowid integer AUTO_INCREMENT PRIMARY KEY,
279 fk_soc integer,
280 fk_groupe integer,
281
282 UNIQUE(fk_soc, fk_groupe)
283 )type=innodb;
284
285 create table llx_groupesociete_remise
286 (
287 rowid integer AUTO_INCREMENT PRIMARY KEY,
288 fk_groupe integer NOT NULL,
289 tms timestamp,
290 datec datetime,
291 fk_user_author integer,
292 remise real default 0,
293 note text
294
295 )type=innodb;
296
297 create table llx_groupesociete
298 (
299 rowid integer AUTO_INCREMENT PRIMARY KEY,
300 parent integer UNIQUE,
301 tms timestamp,
302 datec datetime,
303 nom varchar(60),
304 note text,
305 remise real default 0,
306 fk_user_author integer
307
308 )type=innodb;
309
310 --
311 --
312 --
313 --
314
315 create table llx_commande
316 (
317 rowid integer AUTO_INCREMENT PRIMARY KEY,
318 tms timestamp,
319 fk_soc integer,
320 fk_soc_contact integer,
321 fk_projet integer default 0,
322 ref varchar(30) NOT NULL,
323 date_creation datetime,
324 date_valid datetime,
325 date_cloture datetime,
326 date_commande date,
327 fk_user_author integer,
328 fk_user_valid integer,
329 fk_user_cloture integer,
330 source smallint NOT NULL,
331 fk_statut smallint default 0,
332 amount_ht real default 0,
333 remise_percent real default 0,
334 remise real default 0,
335 tva real default 0,
336 total_ht real default 0,
337 total_ttc real default 0,
338 note text,
339 model_pdf varchar(50),
340 facture tinyint default 0,
341 UNIQUE INDEX (ref)
342 )type=innodb;
343
344 create table llx_commandedet
345 (
346 rowid integer AUTO_INCREMENT PRIMARY KEY,
347 fk_commande integer,
348 fk_product integer,
349 label varchar(255),
350 description text,
351 tva_tx real default 19.6,
352 qty real,
353 remise_percent real default 0,
354 remise real default 0,
355 subprice real,
356 price real
357 )type=innodb;
358
359 create table llx_commande_fournisseur
360 (
361 rowid integer AUTO_INCREMENT PRIMARY KEY,
362 tms timestamp,
363 fk_soc integer,
364 fk_soc_contact integer,
365 fk_projet integer DEFAULT 0,
366 ref varchar(30) NOT NULL,
367 date_creation datetime,
368 date_valid datetime,
369 date_cloture datetime,
370 date_commande date,
371 fk_methode_commande integer default 0,
372 fk_user_author integer,
373 fk_user_valid integer,
374 fk_user_cloture integer,
375 source smallint NOT NULL,
376 fk_statut smallint default 0,
377 amount_ht real default 0,
378 remise_percent real default 0,
379 remise real default 0,
380 tva real default 0,
381 total_ht real default 0,
382 total_ttc real default 0,
383 note text,
384 model_pdf varchar(50),
385
386 UNIQUE INDEX (ref)
387 )type=innodb;
388
389 create table llx_commande_fournisseur_log
390 (
391 rowid integer AUTO_INCREMENT PRIMARY KEY,
392 tms timestamp,
393 datelog datetime NOT NULL,
394 fk_commande integer NOT NULL,
395 fk_statut smallint NOT NULL,
396 fk_user integer NOT NULL
397 )type=innodb;
398
399 create table llx_commande_fournisseurdet
400 (
401 rowid integer AUTO_INCREMENT PRIMARY KEY,
402 fk_commande integer,
403 fk_product integer,
404 ref varchar(50),
405 label varchar(255),
406 description text,
407 tva_tx real DEFAULT 19.6,
408 qty real,
409 remise_percent real DEFAULT 0,
410 remise real DEFAULT 0,
411 subprice real,
412 price real
413 )type=innodb;
414
415
416 create table llx_societe_rib
417 (
418 rowid integer AUTO_INCREMENT PRIMARY KEY,
419 fk_soc integer NOT NULL,
420 datec datetime,
421 tms timestamp,
422 label varchar(30),
423 bank varchar(255),
424 code_banque varchar(7),
425 code_guichet varchar(6),
426 number varchar(255),
427 cle_rib varchar(5),
428 bic varchar(10),
429 iban_prefix varchar(5),
430 domiciliation varchar(255),
431 proprio varchar(60),
432 adresse_proprio varchar(255)
433
434
435 )type=innodb;
436
437
438
439
440
441 drop table if exists llx_c_accountingsystem;
442
443 create table llx_c_accountingsystem
444 (
445 rowid integer AUTO_INCREMENT PRIMARY KEY,
446 fk_pays integer NOT NULL,
447 pcg_version varchar(12) NOT NULL,
448 pcg_type varchar(20) NOT NULL,
449 pcg_subtype varchar(20) NOT NULL,
450 label varchar(128) NOT NULL,
451 account_number varchar(20) NOT NULL,
452 account_parent varchar(20)
453 )type=innodb;
454
455 delete from llx_c_accountingsystem;
456 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 1,1,'PCG99-ABREGE','CAPIT', 'CAPITAL', '101', '1', 'Capital');
457 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 2,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '105', '1', 'Ecarts de réévaluation');
458 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 3,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1061', '1', 'Réserve légale');
459 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 4,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1063', '1', 'Réserves statutaires ou contractuelles');
460 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 5,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1064', '1', 'Réserves réglementées');
461 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 6,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1068', '1', 'Autres réserves');
462 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 7,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '108', '1', 'Compte de l''exploitant');
463 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 8,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '12', '1', 'Résultat de l''exercice');
464 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 9,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '145', '1', 'Amortissements dérogatoires');
465 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 10,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '146', '1', 'Provision spéciale de réévaluation');
466 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 11,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '147', '1', 'Plus-values réinvesties');
467 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 12,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '148', '1', 'Autres provisions réglementées');
468 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 13,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '15', '1', 'Provisions pour risques et charges');
469 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 14,1,'PCG99-ABREGE','CAPIT', 'XXXXXX', '16', '1', 'Emprunts et dettes assimilees');
470 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 15,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '20', '2', 'Immobilisations incorporelles');
471 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 16,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '201','20', 'Frais d''établissement');
472 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 17,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '206','20', 'Droit au bail');
473 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 18,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '207','20', 'Fonds commercial');
474 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 19,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '208','20', 'Autres immobilisations incorporelles');
475 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 20,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '21', '2', 'Immobilisations corporelles');
476 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 21,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '23', '2', 'Immobilisations en cours');
477 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 22,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '27', '2', 'Autres immobilisations financieres');
478 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 23,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '280', '2', 'Amortissements des immobilisations incorporelles');
479 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 24,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '281', '2', 'Amortissements des immobilisations corporelles');
480 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 25,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '290', '2', 'Provisions pour dépréciation des immobilisations incorporelles');
481 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 26,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '291', '2', 'Provisions pour dépréciation des immobilisations corporelles');
482 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 27,1,'PCG99-ABREGE','IMMO', 'XXXXXX', '297', '2', 'Provisions pour dépréciation des autres immobilisations financières');
483 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 28,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '31', '3', 'Matieres premières');
484 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 29,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '32', '3', 'Autres approvisionnements');
485 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 30,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '33', '3', 'En-cours de production de biens');
486 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 31,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '34', '3', 'En-cours de production de services');
487 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 32,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '35', '3', 'Stocks de produits');
488 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 33,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '37', '3', 'Stocks de marchandises');
489 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 34,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '391', '3', 'Provisions pour dépréciation des matières premières');
490 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 35,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '392', '3', 'Provisions pour dépréciation des autres approvisionnements');
491 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 36,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '393', '3', 'Provisions pour dépréciation des en-cours de production de biens');
492 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 37,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '394', '3', 'Provisions pour dépréciation des en-cours de production de services');
493 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 38,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '395', '3', 'Provisions pour dépréciation des stocks de produits');
494 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 39,1,'PCG99-ABREGE','STOCK', 'XXXXXX', '397', '3', 'Provisions pour dépréciation des stocks de marchandises');
495 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 40,1,'PCG99-ABREGE','TIERS', 'SUPPLIER','400', '4', 'Fournisseurs et Comptes rattachés');
496 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 41,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '409', '4', 'Fournisseurs débiteurs');
497 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 42,1,'PCG99-ABREGE','TIERS', 'CUSTOMER','410', '4', 'Clients et Comptes rattachés');
498 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 43,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '419', '4', 'Clients créditeurs');
499 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 44,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '421', '4', 'Personnel');
500 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 45,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '428', '4', 'Personnel');
501 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 46,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '43', '4', 'Sécurité sociale et autres organismes sociaux');
502 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 47,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '444', '4', 'Etat - impôts sur bénéfice');
503 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 48,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '445', '4', 'Etat - Taxes sur chiffre affaire');
504 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 49,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '447', '4', 'Autres impôts, taxes et versements assimilés');
505 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 50,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '45', '4', 'Groupe et associes');
506 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 51,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '455','45', 'Associés');
507 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 52,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '46', '4', 'Débiteurs divers et créditeurs divers');
508 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 53,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '47', '4', 'Comptes transitoires ou d''attente');
509 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 54,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '481', '4', 'Charges à répartir sur plusieurs exercices');
510 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 55,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '486', '4', 'Charges constatées d''avance');
511 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 56,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '487', '4', 'Produits constatés d''avance');
512 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 57,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '491', '4', 'Provisions pour dépréciation des comptes de clients');
513 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 58,1,'PCG99-ABREGE','TIERS', 'XXXXXX', '496', '4', 'Provisions pour dépréciation des comptes de débiteurs divers');
514 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 59,1,'PCG99-ABREGE','FINAN', 'XXXXXX', '50', '5', 'Valeurs mobilières de placement');
515 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 60,1,'PCG99-ABREGE','FINAN', 'BANK', '51', '5', 'Banques, établissements financiers et assimilés');
516 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 61,1,'PCG99-ABREGE','FINAN', 'CASH', '53', '5', 'Caisse');
517 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 62,1,'PCG99-ABREGE','FINAN', 'XXXXXX', '54', '5', 'Régies d''avance et accréditifs');
518 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 63,1,'PCG99-ABREGE','FINAN', 'XXXXXX', '58', '5', 'Virements internes');
519 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 64,1,'PCG99-ABREGE','FINAN', 'XXXXXX', '590', '5', 'Provisions pour dépréciation des valeurs mobilières de placement');
520 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 65,1,'PCG99-ABREGE','CHARGE','PRODUCT', '60', '6', 'Achats');
521 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 66,1,'PCG99-ABREGE','CHARGE','XXXXXX', '603','60', 'Variations des stocks');
522 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 67,1,'PCG99-ABREGE','CHARGE','SERVICE', '61', '6', 'Services extérieurs');
523 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 68,1,'PCG99-ABREGE','CHARGE','XXXXXX', '62', '6', 'Autres services extérieurs');
524 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 69,1,'PCG99-ABREGE','CHARGE','XXXXXX', '63', '6', 'Impôts, taxes et versements assimiles');
525 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 70,1,'PCG99-ABREGE','CHARGE','XXXXXX', '641', '6', 'Rémunérations du personnel');
526 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 71,1,'PCG99-ABREGE','CHARGE','XXXXXX', '644', '6', 'Rémunération du travail de l''exploitant');
527 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 72,1,'PCG99-ABREGE','CHARGE','SOCIAL', '645', '6', 'Charges de sécurité sociale et de prévoyance');
528 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 73,1,'PCG99-ABREGE','CHARGE','XXXXXX', '646', '6', 'Cotisations sociales personnelles de l''exploitant');
529 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 74,1,'PCG99-ABREGE','CHARGE','XXXXXX', '65', '6', 'Autres charges de gestion courante');
530 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 75,1,'PCG99-ABREGE','CHARGE','XXXXXX', '66', '6', 'Charges financières');
531 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 76,1,'PCG99-ABREGE','CHARGE','XXXXXX', '67', '6', 'Charges exceptionnelles');
532 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 77,1,'PCG99-ABREGE','CHARGE','XXXXXX', '681', '6', 'Dotations aux amortissements et aux provisions');
533 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 78,1,'PCG99-ABREGE','CHARGE','XXXXXX', '686', '6', 'Dotations aux amortissements et aux provisions');
534 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 79,1,'PCG99-ABREGE','CHARGE','XXXXXX', '687', '6', 'Dotations aux amortissements et aux provisions');
535 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 80,1,'PCG99-ABREGE','CHARGE','XXXXXX', '691', '6', 'Participation des salariés aux résultats');
536 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 81,1,'PCG99-ABREGE','CHARGE','XXXXXX', '695', '6', 'Impôts sur les bénéfices');
537 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 82,1,'PCG99-ABREGE','CHARGE','XXXXXX', '697', '6', 'Imposition forfaitaire annuelle des sociétés');
538 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 83,1,'PCG99-ABREGE','CHARGE','XXXXXX', '699', '6', 'Produits');
539 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 84,1,'PCG99-ABREGE','PROD', 'PRODUCT', '701', '7', 'Ventes de produits finis');
540 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 85,1,'PCG99-ABREGE','PROD', 'SERVICE', '706', '7', 'Prestations de services');
541 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 86,1,'PCG99-ABREGE','PROD', 'PRODUCT', '707', '7', 'Ventes de marchandises');
542 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 87,1,'PCG99-ABREGE','PROD', 'PRODUCT', '708', '7', 'Produits des activités annexes');
543 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 88,1,'PCG99-ABREGE','PROD', 'XXXXXX', '709', '7', 'Rabais, remises et ristournes accordés par l''entreprise');
544 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 89,1,'PCG99-ABREGE','PROD', 'XXXXXX', '713', '7', 'Variation des stocks');
545 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 90,1,'PCG99-ABREGE','PROD', 'XXXXXX', '72', '7', 'Production immobilisée');
546 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 91,1,'PCG99-ABREGE','PROD', 'XXXXXX', '73', '7', 'Produits nets partiels sur opérations à long terme');
547 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 92,1,'PCG99-ABREGE','PROD', 'XXXXXX', '74', '7', 'Subventions d''exploitation');
548 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 93,1,'PCG99-ABREGE','PROD', 'XXXXXX', '75', '7', 'Autres produits de gestion courante');
549 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 94,1,'PCG99-ABREGE','PROD', 'XXXXXX', '753','75', 'Jetons de présence et rémunérations d''administrateurs, gérants,...');
550 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 95,1,'PCG99-ABREGE','PROD', 'XXXXXX', '754','75', 'Ristournes perçues des coopératives');
551 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 96,1,'PCG99-ABREGE','PROD', 'XXXXXX', '755','75', 'Quotes-parts de résultat sur opérations faites en commun');
552 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 97,1,'PCG99-ABREGE','PROD', 'XXXXXX', '76', '7', 'Produits financiers');
553 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 98,1,'PCG99-ABREGE','PROD', 'XXXXXX', '77', '7', 'Produits exceptionnels');
554 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES ( 99,1,'PCG99-ABREGE','PROD', 'XXXXXX', '781', '7', 'Reprises sur amortissements et provisions');
555 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (100,1,'PCG99-ABREGE','PROD', 'XXXXXX', '786', '7', 'Reprises sur provisions pour risques');
556 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (101,1,'PCG99-ABREGE','PROD', 'XXXXXX', '787', '7', 'Reprises sur provisions');
557 insert into llx_c_accountingsystem (rowid, fk_pays, pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (102,1,'PCG99-ABREGE','PROD', 'XXXXXX', '79', '7', 'Transferts de charges');
558
559
560 drop table if exists llx_c_actioncomm;
561
562 create table llx_c_actioncomm
563 (
564 id integer PRIMARY KEY,
565 code varchar(12) UNIQUE NOT NULL,
566 type varchar(10) default 'system' not null,
567 libelle varchar(30) NOT NULL,
568 active tinyint default 1 NOT NULL,
569 todo tinyint
570 )type=innodb;
571
572 delete from llx_c_actioncomm;
573 insert into llx_c_actioncomm (id, code, type, libelle) values ( 1, 'AC_TEL', 'system', 'Appel Téléphonique');
574 insert into llx_c_actioncomm (id, code, type, libelle) values ( 2, 'AC_FAX', 'system', 'Envoi Fax');
575 insert into llx_c_actioncomm (id, code, type, libelle) values ( 3, 'AC_PROP', 'system', 'Envoi Proposition');
576 insert into llx_c_actioncomm (id, code, type, libelle) values ( 4, 'AC_EMAIL','system', 'Envoi Email');
577 insert into llx_c_actioncomm (id, code, type, libelle) values ( 5, 'AC_RDV', 'system', 'Prendre rendez-vous');
578 insert into llx_c_actioncomm (id, code, type, libelle) values ( 9, 'AC_FAC', 'system', 'Envoi Facture');
579 insert into llx_c_actioncomm (id, code, type, libelle) values (10, 'AC_REL', 'system', 'Relance effectuée');
580 insert into llx_c_actioncomm (id, code, type, libelle) values (11, 'AC_CLO', 'system', 'Clôture');
581
582
583 drop table if exists llx_c_ape;
584
585 create table llx_c_ape
586 (
587 rowid integer AUTO_INCREMENT UNIQUE,
588 code_ape varchar(5) PRIMARY KEY,
589 libelle varchar(255),
590 active tinyint default 1 NOT NULL
591 )type=innodb;
592
593
594 delete from llx_c_ape;
595
596
597 create table llx_c_chargesociales
598 (
599 id integer PRIMARY KEY,
600 libelle varchar(80),
601 deductible smallint NOT NULL default 0,
602 active tinyint default 1 NOT NULL
603 )type=innodb;
604
605 insert into llx_c_chargesociales (id,libelle,deductible) values ( 1, 'Allocations familiales',1);
606 insert into llx_c_chargesociales (id,libelle,deductible) values ( 2, 'GSG Deductible',1);
607 insert into llx_c_chargesociales (id,libelle,deductible) values ( 3, 'GSG/CRDS NON Deductible',0);
608
609 drop table c_chargesociales;
610
611
612 drop table if exists llx_c_civilite;
613
614 create table llx_c_civilite
615 (
616 rowid integer PRIMARY KEY,
617 code varchar(6) UNIQUE NOT NULL,
618 civilite varchar(50),
619 active tinyint default 1 NOT NULL
620 )type=innodb;
621
622 delete from llx_c_civilite;
623 insert into llx_c_civilite (rowid, code, civilite, active) values (1 , 'MME', 'Madame', 1);
624 insert into llx_c_civilite (rowid, code, civilite, active) values (3 , 'MR', 'Monsieur', 1);
625 insert into llx_c_civilite (rowid, code, civilite, active) values (5 , 'MLE', 'Mademoiselle', 1);
626 insert into llx_c_civilite (rowid, code, civilite, active) values (7 , 'MTRE', 'Maître', 1);
627
628
629 drop table if exists llx_c_departements;
630
631 create table llx_c_departements
632 (
633 rowid integer AUTO_INCREMENT PRIMARY KEY,
634 code_departement varchar(6) NOT NULL,
635 fk_region integer,
636 cheflieu varchar(7),
637 tncc integer,
638 ncc varchar(50),
639 nom varchar(50),
640 active tinyint default 1 NOT NULL,
641
642 key (fk_region)
643 )type=innodb;
644
645 delete from llx_c_departements;
646 insert into llx_c_departements (rowid, fk_region, code_departement,cheflieu,tncc,ncc,nom) values (0,0,'0','0',0,'-','-');
647
648 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'01','01053',5,'AIN','Ain');
649 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (22,'02','02408',5,'AISNE','Aisne');
650 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (83,'03','03190',5,'ALLIER','Allier');
651 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (93,'04','04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence');
652 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (93,'05','05061',4,'HAUTES-ALPES','Hautes-Alpes');
653 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (93,'06','06088',4,'ALPES-MARITIMES','Alpes-Maritimes');
654 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'07','07186',5,'ARDECHE','Ardèche');
655 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (21,'08','08105',4,'ARDENNES','Ardennes');
656 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'09','09122',5,'ARIEGE','Ariège');
657 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (21,'10','10387',5,'AUBE','Aube');
658 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (91,'11','11069',5,'AUDE','Aude');
659 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'12','12202',5,'AVEYRON','Aveyron');
660 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (93,'13','13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône');
661 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (25,'14','14118',2,'CALVADOS','Calvados');
662 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (83,'15','15014',2,'CANTAL','Cantal');
663 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (54,'16','16015',3,'CHARENTE','Charente');
664 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (54,'17','17300',3,'CHARENTE-MARITIME','Charente-Maritime');
665 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (24,'18','18033',2,'CHER','Cher');
666 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (74,'19','19272',3,'CORREZE','Corrèze');
667 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (94,'2A','2A004',3,'CORSE-DU-SUD','Corse-du-Sud');
668 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (94,'2B','2B033',3,'HAUTE-CORSE','Haute-Corse');
669 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (26,'21','21231',3,'COTE-D\'OR','Côte-d\'Or');
670 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (53,'22','22278',4,'COTES-D\'ARMOR','Côtes-d\'Armor');
671 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (74,'23','23096',3,'CREUSE','Creuse');
672 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (72,'24','24322',3,'DORDOGNE','Dordogne');
673 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (43,'25','25056',2,'DOUBS','Doubs');
674 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'26','26362',3,'DROME','Drôme');
675 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (23,'27','27229',5,'EURE','Eure');
676 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (24,'28','28085',1,'EURE-ET-LOIR','Eure-et-Loir');
677 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (53,'29','29232',2,'FINISTERE','Finistère');
678 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (91,'30','30189',2,'GARD','Gard');
679 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'31','31555',3,'HAUTE-GARONNE','Haute-Garonne');
680 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'32','32013',2,'GERS','Gers');
681 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (72,'33','33063',3,'GIRONDE','Gironde');
682 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (91,'34','34172',5,'HERAULT','Hérault');
683 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (53,'35','35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine');
684 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (24,'36','36044',5,'INDRE','Indre');
685 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (24,'37','37261',1,'INDRE-ET-LOIRE','Indre-et-Loire');
686 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'38','38185',5,'ISERE','Isère');
687 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (43,'39','39300',2,'JURA','Jura');
688 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (72,'40','40192',4,'LANDES','Landes');
689 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (24,'41','41018',0,'LOIR-ET-CHER','Loir-et-Cher');
690 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'42','42218',3,'LOIRE','Loire');
691 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (83,'43','43157',3,'HAUTE-LOIRE','Haute-Loire');
692 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (52,'44','44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique');
693 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (24,'45','45234',2,'LOIRET','Loiret');
694 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'46','46042',2,'LOT','Lot');
695 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (72,'47','47001',0,'LOT-ET-GARONNE','Lot-et-Garonne');
696 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (91,'48','48095',3,'LOZERE','Lozère');
697 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (52,'49','49007',0,'MAINE-ET-LOIRE','Maine-et-Loire');
698 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (25,'50','50502',3,'MANCHE','Manche');
699 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (21,'51','51108',3,'MARNE','Marne');
700 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (21,'52','52121',3,'HAUTE-MARNE','Haute-Marne');
701 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (52,'53','53130',3,'MAYENNE','Mayenne');
702 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (41,'54','54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle');
703 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (41,'55','55029',3,'MEUSE','Meuse');
704 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (53,'56','56260',2,'MORBIHAN','Morbihan');
705 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (41,'57','57463',3,'MOSELLE','Moselle');
706 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (26,'58','58194',3,'NIEVRE','Nièvre');
707 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (31,'59','59350',2,'NORD','Nord');
708 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (22,'60','60057',5,'OISE','Oise');
709 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (25,'61','61001',5,'ORNE','Orne');
710 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (31,'62','62041',2,'PAS-DE-CALAIS','Pas-de-Calais');
711 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (83,'63','63113',2,'PUY-DE-DOME','Puy-de-Dôme');
712 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (72,'64','64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques');
713 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'65','65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées');
714 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (91,'66','66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales');
715 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (42,'67','67482',2,'BAS-RHIN','Bas-Rhin');
716 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (42,'68','68066',2,'HAUT-RHIN','Haut-Rhin');
717 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'69','69123',2,'RHONE','Rhône');
718 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (43,'70','70550',3,'HAUTE-SAONE','Haute-Saône');
719 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (26,'71','71270',0,'SAONE-ET-LOIRE','Saône-et-Loire');
720 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (52,'72','72181',3,'SARTHE','Sarthe');
721 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'73','73065',3,'SAVOIE','Savoie');
722 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'74','74010',3,'HAUTE-SAVOIE','Haute-Savoie');
723 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'75','75056',0,'PARIS','Paris');
724 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (23,'76','76540',3,'SEINE-MARITIME','Seine-Maritime');
725 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'77','77288',0,'SEINE-ET-MARNE','Seine-et-Marne');
726 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'78','78646',4,'YVELINES','Yvelines');
727 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (54,'79','79191',4,'DEUX-SEVRES','Deux-Sèvres');
728 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (22,'80','80021',3,'SOMME','Somme');
729 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'81','81004',2,'TARN','Tarn');
730 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (73,'82','82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne');
731 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (93,'83','83137',2,'VAR','Var');
732 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (93,'84','84007',0,'VAUCLUSE','Vaucluse');
733 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (52,'85','85191',3,'VENDEE','Vendée');
734 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (54,'86','86194',3,'VIENNE','Vienne');
735 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (74,'87','87085',3,'HAUTE-VIENNE','Haute-Vienne');
736 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (41,'88','88160',4,'VOSGES','Vosges');
737 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (26,'89','89024',5,'YONNE','Yonne');
738 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (43,'90','90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort');
739 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'91','91228',5,'ESSONNE','Essonne');
740 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'92','92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine');
741 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'93','93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis');
742 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'94','94028',2,'VAL-DE-MARNE','Val-de-Marne');
743 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'95','95500',2,'VAL-D\'OISE','Val-d\'Oise');
744 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 1,'971','97105',3,'GUADELOUPE','Guadeloupe');
745 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
746 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
747 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion');
748
749 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'01','',1,'ANVERS','Anvers');
750 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (203,'02','',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale');
751 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'03','',2,'BRABANT-WALLON','Brabant-Wallon');
752 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'04','',1,'BRABANT-FLAMAND','Brabant-Flamand');
753 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale');
754 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale');
755 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'07','',2,'HAINAUT','Hainaut');
756 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'08','',2,'LIEGE','Liège');
757 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'09','',1,'LIMBOURG','Limbourg');
758 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'10','',2,'LUXEMBOURG','Luxembourg');
759 insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'11','',2,'NAMUR','Namur');
760
761
762 drop table if exists llx_c_effectif;
763
764 create table llx_c_effectif
765 (
766 id integer PRIMARY KEY,
767 code varchar(12) UNIQUE NOT NULL,
768 libelle varchar(30),
769 active tinyint default 1 NOT NULL
770 )type=innodb;
771
772 delete from llx_c_effectif;
773 insert into llx_c_effectif (id,code,libelle) values (0, 'EF0', '-');
774 insert into llx_c_effectif (id,code,libelle) values (1, 'EF1-5', '1 - 5');
775 insert into llx_c_effectif (id,code,libelle) values (2, 'EF6-10', '6 - 10');
776 insert into llx_c_effectif (id,code,libelle) values (3, 'EF11-50', '11 - 50');
777 insert into llx_c_effectif (id,code,libelle) values (4, 'EF51-100', '51 - 100');
778 insert into llx_c_effectif (id,code,libelle) values (5, 'EF100-500', '100 - 500');
779 insert into llx_c_effectif (id,code,libelle) values (6, 'EF500-', '> 500');
780
781
782 drop table if exists llx_c_forme_juridique;
783
784 create table llx_c_forme_juridique
785 (
786 rowid integer AUTO_INCREMENT PRIMARY KEY,
787 code varchar(12) UNIQUE NOT NULL,
788 fk_pays integer NOT NULL,
789 libelle varchar(255),
790 active tinyint default 1 NOT NULL
791
792 )type=innodb;
793
794 delete from llx_c_forme_juridique;
795
796 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (0, '0','-');
797
798 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'11','Artisan Commerçant');
799 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'12','Commerçant');
800 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'13','Artisan');
801 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'14','Officier public ou ministériel');
802 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'15','Profession libérale');
803 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'16','Exploitant agricole');
804 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'17','Agent commercial');
805 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'18','Associé Gérant de société');
806 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'19','(Autre) personne physique');
807 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'21','Indivision');
808 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'22','Société créée de fait');
809 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'23','Société en participation');
810 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'27','Paroisse hors zone concordataire');
811 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'29','Autre groupement de droit privé non doté de la personnalité morale');
812 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'31','Personne morale de droit étranger, immatriculée au RCS');
813 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'32','Personne morale de droit étranger, non immatriculée au RCS');
814
815 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'41','Établissement public ou régie à caractère industriel ou commercial');
816
817 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'51','Société coopérative commerciale particulière');
818 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'52','Société en nom collectif');
819 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'53','Société en commandite');
820 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'54','Société à responsabilité limité (SARL)');
821 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'55','Société anonyme à conseil d\'administration');
822 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'56','Société anonyme à directoire');
823 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'57','Société par actions simplifiée');
824
825 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'61','Caisse d\'épargne et de prévoyance');
826 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'62','Groupement d\'intérêt économique');
827 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'63','Société coopérative agricole');
828 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'64','Société non commerciale d\'assurances');
829 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'65','Société civile');
830 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'69','Autres personnes de droit privé inscrites au registre du commerce et des sociétés');
831
832 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'71','Administration de l\'état');
833 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'72','Collectivité territoriale');
834 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'73','Établissement public administratif');
835 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'74','Autre personne morale de droit public administratif');
836
837 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'81','Organisme gérant un régime de protection social à adhésion obligatoire');
838 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'82','Organisme mutualiste');
839 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'83','Comité d\'entreprise');
840 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'84','Organisme professionnel');
841 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'85','Organisme de retraite à adhésion non obligatoire');
842
843 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'91','Syndicat de propriétaires');
844 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'92','Association loi 1901 ou assimilé');
845 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'93','Fondation');
846 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'99','Autre personne morale de droit privé');
847
848 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'100','Indépendant');
849 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'101','SPRL - Société à responsabilité limitée');
850 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'102','SA - Société Anonyme');
851 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'103','SCRL - Société coopérative à responsabilité limitée');
852 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'104','ASBL - Association sans but Lucratif');
853 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'105','SCRI - Société coopérative à responsabilité illimitée');
854 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'106','SCS - Société en comanndite simple');
855 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'107','SCA - Société en commandite par action');
856 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'108','SNC - Société en nom collectif');
857 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'109','GIE - Groupement d\'intérêt économique');
858 insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2,'110','GEIE - Groupement européen d\'intérêt économique');
859
860 drop table if exists llx_c_paiement;
861
862 create table llx_c_paiement
863 (
864 id integer PRIMARY KEY,
865 code varchar(6) UNIQUE NOT NULL,
866 libelle varchar(30),
867 type smallint,
868 active tinyint default 1 NOT NULL
869 )type=innodb;
870
871 delete from llx_c_paiement;
872 insert into llx_c_paiement (id,code,libelle,type) values (0, '', '-', 3);
873 insert into llx_c_paiement (id,code,libelle,type) values (1, 'TIP', 'TIP', 1);
874 insert into llx_c_paiement (id,code,libelle,type) values (2, 'VIR', 'Virement', 2);
875 insert into llx_c_paiement (id,code,libelle,type) values (3, 'PRE', 'Prélèvement', 1);
876 insert into llx_c_paiement (id,code,libelle,type) values (4, 'LIQ', 'Liquide', 0);
877 insert into llx_c_paiement (id,code,libelle,type) values (5, 'VAD', 'Paiement en ligne', 0);
878 insert into llx_c_paiement (id,code,libelle,type) values (6, 'CB', 'Carte Bancaire', 1);
879 insert into llx_c_paiement (id,code,libelle,type) values (7, 'CHQ', 'Chèque', 2);
880
881 drop table if exists llx_c_pays;
882
883 create table llx_c_pays
884 (
885 rowid integer PRIMARY KEY,
886 code varchar(6) UNIQUE NOT NULL,
887 libelle varchar(25) NOT NULL,
888 active tinyint default 1 NOT NULL
889 )type=innodb;
890
891 delete from llx_c_pays;
892 insert into llx_c_pays (rowid,code,libelle) values (0, '' , '-' );
893 insert into llx_c_pays (rowid,code,libelle) values (1, 'FR', 'France' );
894 insert into llx_c_pays (rowid,code,libelle) values (2, 'BE', 'Belgique' );
895 insert into llx_c_pays (rowid,code,libelle) values (3, 'IT', 'Italie' );
896 insert into llx_c_pays (rowid,code,libelle) values (4, 'ES', 'Espagne' );
897 insert into llx_c_pays (rowid,code,libelle) values (5, 'DE', 'Allemagne' );
898 insert into llx_c_pays (rowid,code,libelle) values (6, 'CH', 'Suisse' );
899 insert into llx_c_pays (rowid,code,libelle) values (7, 'GB', 'Royaume uni' );
900 insert into llx_c_pays (rowid,code,libelle) values (8, 'IE', 'Irlande' );
901 insert into llx_c_pays (rowid,code,libelle) values (9, 'CN', 'Chine' );
902 insert into llx_c_pays (rowid,code,libelle) values (10, 'TN', 'Tunisie' );
903 insert into llx_c_pays (rowid,code,libelle) values (11, 'US', 'Etats Unis' );
904 insert into llx_c_pays (rowid,code,libelle) values (12, 'MA', 'Maroc' );
905 insert into llx_c_pays (rowid,code,libelle) values (13, 'DZ', 'Algérie' );
906 insert into llx_c_pays (rowid,code,libelle) values (14, 'CA', 'Canada' );
907 insert into llx_c_pays (rowid,code,libelle) values (15, 'TG', 'Togo' );
908 insert into llx_c_pays (rowid,code,libelle) values (16, 'GA', 'Gabon' );
909 insert into llx_c_pays (rowid,code,libelle) values (17, 'NL', 'Pays Bas' );
910 insert into llx_c_pays (rowid,code,libelle) values (18, 'HU', 'Hongrie' );
911 insert into llx_c_pays (rowid,code,libelle) values (19, 'RU', 'Russie' );
912 insert into llx_c_pays (rowid,code,libelle) values (20, 'SE', 'Suède' );
913 insert into llx_c_pays (rowid,code,libelle) values (21, 'CI', 'Côte d\'Ivoire' );
914 insert into llx_c_pays (rowid,code,libelle) values (23, 'SN', 'Sénégal' );
915 insert into llx_c_pays (rowid,code,libelle) values (24, 'AR', 'Argentine' );
916 insert into llx_c_pays (rowid,code,libelle) values (25, 'CM', 'Cameroun' );
917
918 drop table if exists llx_c_propalst;
919
920 create table llx_c_propalst
921 (
922 id smallint PRIMARY KEY,
923 code varchar(12) UNIQUE NOT NULL,
924 label varchar(30),
925 active tinyint default 1 NOT NULL
926 )type=innodb;
927
928 delete from llx_c_propalst;
929 insert into llx_c_propalst (id,code,label) values (0, 'PR_DRAFT', 'Brouillon');
930 insert into llx_c_propalst (id,code,label) values (1, 'PR_OPEN', 'Ouverte');
931 insert into llx_c_propalst (id,code,label) values (2, 'PR_SIGNED', 'Signée');
932 insert into llx_c_propalst (id,code,label) values (3, 'PR_NOTSIGNED', 'Non Signée');
933 insert into llx_c_propalst (id,code,label) values (4, 'PR_FAC', 'Facturée');
934
935 drop table if exists llx_c_stcomm;
936
937 create table llx_c_stcomm
938 (
939 id integer PRIMARY KEY,
940 code varchar(12) UNIQUE NOT NULL,
941 libelle varchar(30),
942 active tinyint default 1 NOT NULL
943 )type=innodb;
944
945 delete from llx_c_stcomm;
946 insert into llx_c_stcomm (id,code,libelle) values (-1, 'ST_NO', 'Ne pas contacter');
947 insert into llx_c_stcomm (id,code,libelle) values ( 0, 'ST_NEVER', 'Jamais contacté');
948 insert into llx_c_stcomm (id,code,libelle) values ( 1, 'ST_TODO', 'A contacter');
949 insert into llx_c_stcomm (id,code,libelle) values ( 2, 'ST_PEND', 'Contact en cours');
950 insert into llx_c_stcomm (id,code,libelle) values ( 3, 'ST_DONE', 'Contactée');
951
952 drop table if exists llx_c_typent;
953
954 create table llx_c_typent
955 (
956 id integer PRIMARY KEY,
957 code varchar(12) UNIQUE NOT NULL,
958 libelle varchar(30),
959 active tinyint default 1 NOT NULL
960 )type=innodb;
961
962 delete from llx_c_typent;
963 insert into llx_c_typent (id,code,libelle) values ( 0, 'TE_UNKNOWN', 'Indifférent');
964 insert into llx_c_typent (id,code,libelle) values ( 1, 'TE_STARTUP', 'Start-up');
965 insert into llx_c_typent (id,code,libelle) values ( 2, 'TE_GROUP', 'Grand groupe');
966 insert into llx_c_typent (id,code,libelle) values ( 3, 'TE_MEDIUM', 'PME/PMI');
967 insert into llx_c_typent (id,code,libelle) values ( 4, 'TE_ADMIN', 'Administration');
968 insert into llx_c_typent (id,code,libelle) values (100, 'TE_OTHER', 'Autres');
969
970 drop table if exists llx_c_regions;
971
972 create table llx_c_regions
973 (
974 rowid integer AUTO_INCREMENT PRIMARY KEY,
975 code_region integer UNIQUE NOT NULL,
976 fk_pays integer NOT NULL,
977 cheflieu varchar(7),
978 tncc integer,
979 nom varchar(50),
980 active tinyint default 1 NOT NULL
981 )type=innodb;
982
983 delete from llx_c_regions;
984 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (0,0,0,'0',0,'-');
985 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (101,1, 1,'97105',3,'Guadeloupe');
986 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (102,1, 2,'97209',3,'Martinique');
987 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (103,1, 3,'97302',3,'Guyane');
988 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (104,1, 4,'97411',3,'Réunion');
989 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (105,1, 11,'75056',1,'Île-de-France');
990 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (106,1, 21,'51108',0,'Champagne-Ardenne');
991 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (107,1, 22,'80021',0,'Picardie');
992 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (108,1, 23,'76540',0,'Haute-Normandie');
993 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (109,1, 24,'45234',2,'Centre');
994 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (110,1, 25,'14118',0,'Basse-Normandie');
995 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (111,1, 26,'21231',0,'Bourgogne');
996 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (112,1, 31,'59350',2,'Nord-Pas-de-Calais');
997 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (113,1, 41,'57463',0,'Lorraine');
998 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (114,1, 42,'67482',1,'Alsace');
999 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (115,1, 43,'25056',0,'Franche-Comté');
1000 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (116,1, 52,'44109',4,'Pays de la Loire');
1001 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (117,1, 53,'35238',0,'Bretagne');
1002 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (118,1, 54,'86194',2,'Poitou-Charentes');
1003 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (119,1, 72,'33063',1,'Aquitaine');
1004 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (120,1, 73,'31555',0,'Midi-Pyrénées');
1005 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (121,1, 74,'87085',2,'Limousin');
1006 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (122,1, 82,'69123',2,'Rhône-Alpes');
1007 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (123,1, 83,'63113',1,'Auvergne');
1008 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (124,1, 91,'34172',2,'Languedoc-Roussillon');
1009 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (125,1, 93,'13055',0,'Provence-Alpes-Côte d\'Azur');
1010 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (126,1, 94,'2A004',0,'Corse');
1011
1012 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (201,2,201,'',1,'Flandre');
1013 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (202,2,202,'',2,'Wallonie');
1014 insert into llx_c_regions (rowid,fk_pays,code_region,cheflieu,tncc,nom) values (203,2,203,'',3,'Bruxelles-Capitale');

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26