2
0
forked from Wavyzz/dolibarr

Merge branch 'Upstream/develop'

This commit is contained in:
aspangaro
2014-07-04 06:21:00 +02:00
47 changed files with 891 additions and 324 deletions

View File

@@ -20,11 +20,16 @@
create table llx_accountingaccount
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
datec datetime,
tms timestamp DEFAULT NULL,
fk_pcg_version varchar(12) NOT NULL,
pcg_type varchar(20) NOT NULL,
pcg_subtype varchar(20) NOT NULL,
account_number varchar(20) NOT NULL,
account_parent varchar(20),
account_number varchar(32) NOT NULL,
account_parent varchar(32),
label varchar(255) NOT NULL,
fk_user_author integer DEFAULT NULL,
fk_user_modif integer DEFAULT NULL,
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@@ -20,7 +20,7 @@
create table llx_accountingdebcred
(
fk_transaction integer NOT NULL,
account_number varchar(20) NOT NULL,
account_number varchar(32) NOT NULL,
amount real NOT NULL,
direction varchar(1) NOT NULL
)ENGINE=innodb;

View File

@@ -21,5 +21,5 @@
ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element);
ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element);
-- Pas de contraite sur fk_source et fk_target car pointe sur differentes tables
-- Pas de contrainte sur fk_source et fk_target car pointe sur differentes tables

View File

@@ -1,7 +1,8 @@
-- =============================================================================
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
--
-- 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
@@ -18,39 +19,39 @@
--
-- =============================================================================
-- courant : type de compte: 0 epargne, 1 courant, 2 caisse
-- clos : le compte est-il clos ou encore ouvert
-- courant : type of account: 0 epargne, 1 curent/card/cheque, 2 cash
-- clos : is account opened or closed
create table llx_bank_account
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
tms timestamp,
ref varchar(12) NOT NULL,
label varchar(30) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
bank varchar(60),
code_banque varchar(8),
code_guichet varchar(6),
number varchar(255),
cle_rib varchar(5),
bic varchar(11),
iban_prefix varchar(34), -- 34 according to ISO 13616
country_iban varchar(2), -- deprecated
cle_iban varchar(2),
domiciliation varchar(255),
state_id integer DEFAULT NULL,
fk_pays integer NOT NULL,
proprio varchar(60),
owner_address varchar(255),
courant smallint DEFAULT 0 NOT NULL,
clos smallint DEFAULT 0 NOT NULL,
rappro smallint DEFAULT 1,
url varchar(128),
account_number varchar(24), -- bank accountancy number
currency_code varchar(3) NOT NULL,
min_allowed integer DEFAULT 0,
min_desired integer DEFAULT 0,
comment text
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
tms timestamp,
ref varchar(12) NOT NULL,
label varchar(30) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
bank varchar(60),
code_banque varchar(8),
code_guichet varchar(6),
number varchar(255),
cle_rib varchar(5),
bic varchar(11),
iban_prefix varchar(34), -- 34 according to ISO 13616
country_iban varchar(2), -- deprecated
cle_iban varchar(2),
domiciliation varchar(255),
state_id integer DEFAULT NULL,
fk_pays integer NOT NULL,
proprio varchar(60),
owner_address varchar(255),
courant smallint DEFAULT 0 NOT NULL,
clos smallint DEFAULT 0 NOT NULL,
rappro smallint DEFAULT 1,
url varchar(128),
account_number varchar(32), -- bank accountancy number
accountancy_journal varchar(3) DEFAULT NULL, -- bank accountancy journal
currency_code varchar(3) NOT NULL,
min_allowed integer DEFAULT 0,
min_desired integer DEFAULT 0,
comment text
)ENGINE=innodb;

View File

@@ -24,7 +24,7 @@ create table llx_c_chargesociales
deductible smallint DEFAULT 0 NOT NULL,
active tinyint DEFAULT 1 NOT NULL,
code varchar(12) NOT NULL,
accountancy_code varchar(24) DEFAULT NULL,
accountancy_code varchar(32) DEFAULT NULL,
fk_pays integer DEFAULT 1 NOT NULL,
module varchar(32) NULL
)ENGINE=innodb;

View File

@@ -23,7 +23,7 @@ create table llx_c_revenuestamp
taux double NOT NULL,
note varchar(128),
active tinyint DEFAULT 1 NOT NULL,
accountancy_code_sell varchar(15) DEFAULT NULL,
accountancy_code_buy varchar(15) DEFAULT NULL
accountancy_code_sell varchar(32) DEFAULT NULL,
accountancy_code_buy varchar(32) DEFAULT NULL
)ENGINE=innodb;

View File

@@ -1,6 +1,6 @@
-- ========================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
-- Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
-- Copyright (C) 2011-2012 Alexandre Spangaro <alexandre.spangaro@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
@@ -23,14 +23,14 @@ create table llx_c_tva
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
fk_pays integer NOT NULL,
taux double NOT NULL,
localtax1 double NOT NULL DEFAULT 0,
localtax1 varchar(10) NOT NULL DEFAULT '0',
localtax1_type varchar(10) NOT NULL DEFAULT '0',
localtax2 double NOT NULL DEFAULT 0,
localtax2_type varchar(10) NOT NULL DEFAULT '0',
localtax2 varchar(10) NOT NULL DEFAULT '0',
localtax2_type varchar(10) NOT NULL DEFAULT '0',
recuperableonly integer NOT NULL DEFAULT 0,
note varchar(128),
active tinyint DEFAULT 1 NOT NULL,
accountancy_code_sell varchar(15) DEFAULT NULL,
accountancy_code_buy varchar(15) DEFAULT NULL
accountancy_code_sell varchar(32) DEFAULT NULL,
accountancy_code_buy varchar(32) DEFAULT NULL
)ENGINE=innodb;

View File

@@ -1,32 +0,0 @@
-- ===================================================================
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- 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 3 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, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
create table llx_compta
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
datev date, -- date de valeur
amount real DEFAULT 0 NOT NULL ,
label varchar(255),
fk_compta_account integer,
fk_user_author integer,
fk_user_valid integer,
valid tinyint DEFAULT 0,
note text
)ENGINE=innodb;

View File

@@ -1,28 +0,0 @@
-- ===================================================================
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- 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 3 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, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
create table llx_compta_account
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
number varchar(12),
label varchar(255),
fk_user_author integer,
note text
)ENGINE=innodb;

View File

@@ -1,29 +0,0 @@
-- ===================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- 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 3 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, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
create table llx_compta_compte_generaux
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
date_creation datetime,
numero varchar(50),
intitule varchar(255),
fk_user_author integer,
note text,
UNIQUE(numero)
)ENGINE=innodb;

View File

@@ -1,6 +1,6 @@
-- ===================================================================
-- Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
-- Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
-- Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
--
-- 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
@@ -21,6 +21,7 @@ create table llx_localtax
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
localtaxtype tinyint(4),
tms timestamp,
datep date, -- date of payment
datev date, -- date of value

View File

@@ -57,8 +57,8 @@ create table llx_product
url varchar(255),
barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0,
accountancy_code_sell varchar(15), -- Selling accountancy code
accountancy_code_buy varchar(15), -- Buying accountancy code
accountancy_code_sell varchar(32), -- Selling accountancy code
accountancy_code_buy varchar(32), -- Buying accountancy code
partnumber varchar(32), -- Not used. Used by external modules.
weight float DEFAULT NULL,
weight_units tinyint DEFAULT NULL,

View File

@@ -20,7 +20,8 @@ create table llx_projet_task_time
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_task integer NOT NULL,
task_date date,
task_date date, -- only the day
task_datehour datetime, -- day + hour
task_duration double,
fk_user integer,
thm double(24,8),

View File

@@ -81,7 +81,9 @@ create table llx_societe
cond_reglement_supplier tinyint, -- condition de reglement fournisseur
tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA
localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1
localtax1_value double(6,3),
localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2
localtax2_value double(6,3),
barcode varchar(255), -- barcode
fk_barcode_type integer NULL DEFAULT 0, -- barcode type
price_level integer NULL, -- level of price for multiprices

View File

@@ -67,7 +67,7 @@ create table llx_user
color varchar(6),
barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0,
accountancy_code varchar(24) NULL,
accountancy_code varchar(32) NULL,
nb_holiday integer DEFAULT 0,
salary double(24,8)
)ENGINE=innodb;