Prepare database for invoicing of projects
This commit is contained in:
parent
2e705b5a88
commit
12aec8f806
@ -22,5 +22,12 @@
|
|||||||
-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
|
-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
|
||||||
-- Note: fields with type BLOB/TEXT can't have default value.
|
-- Note: fields with type BLOB/TEXT can't have default value.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- For 8.0
|
-- For 8.0
|
||||||
|
|
||||||
ALTER TABLE llx_societe ADD COLUMN fk_entrepot integer DEFAULT 0;
|
ALTER TABLE llx_societe ADD COLUMN fk_entrepot integer DEFAULT 0;
|
||||||
|
|
||||||
|
ALTER TABLE llx_projet ADD COLUMN bill_time integer DEFAULT 0;
|
||||||
@ -42,6 +42,7 @@ create table llx_projet
|
|||||||
--budget_days real, -- budget in days is sum of field planned_workload of tasks
|
--budget_days real, -- budget in days is sum of field planned_workload of tasks
|
||||||
opp_amount double(24,8),
|
opp_amount double(24,8),
|
||||||
budget_amount double(24,8),
|
budget_amount double(24,8),
|
||||||
|
bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices
|
||||||
model_pdf varchar(255),
|
model_pdf varchar(255),
|
||||||
import_key varchar(14) -- Import key
|
import_key varchar(14) -- Import key
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -33,8 +33,6 @@ create table llx_societe
|
|||||||
|
|
||||||
statut tinyint DEFAULT 0, -- statut
|
statut tinyint DEFAULT 0, -- statut
|
||||||
parent integer,
|
parent integer,
|
||||||
tms timestamp,
|
|
||||||
datec datetime, -- creation date
|
|
||||||
|
|
||||||
status tinyint DEFAULT 1, -- cessation d'activité ( 1 -- en activité, 0 -- cessation d'activité)
|
status tinyint DEFAULT 1, -- cessation d'activité ( 1 -- en activité, 0 -- cessation d'activité)
|
||||||
|
|
||||||
@ -57,14 +55,14 @@ create table llx_societe
|
|||||||
fk_typent integer DEFAULT 0, --
|
fk_typent integer DEFAULT 0, --
|
||||||
fk_forme_juridique integer DEFAULT 0, -- juridical status
|
fk_forme_juridique integer DEFAULT 0, -- juridical status
|
||||||
fk_currency varchar(3), -- default currency
|
fk_currency varchar(3), -- default currency
|
||||||
siren varchar(128), -- IDProf1: siren or RCS for france
|
siren varchar(128), -- IDProf1: siren or RCS for france, ...
|
||||||
siret varchar(128), -- IDProf2: siret for france
|
siret varchar(128), -- IDProf2: siret for france, ...
|
||||||
ape varchar(128), -- IDProf3: code ape for france
|
ape varchar(128), -- IDProf3: code ape for france, ...
|
||||||
idprof4 varchar(128), -- IDProf4: nu for france
|
idprof4 varchar(128), -- IDProf4: nu for france
|
||||||
idprof5 varchar(128), -- IDProf5: nu for france
|
idprof5 varchar(128), -- IDProf5: nu for france
|
||||||
idprof6 varchar(128), -- IDProf6: nu for france
|
idprof6 varchar(128), -- IDProf6: nu for france
|
||||||
tva_intra varchar(20), -- tva
|
tva_intra varchar(20), -- tva
|
||||||
capital double(24,8), -- capital de la societe
|
capital double(24,8) DEFAULT NULL, -- capital de la societe
|
||||||
fk_stcomm integer DEFAULT 0 NOT NULL, -- commercial statut
|
fk_stcomm integer DEFAULT 0 NOT NULL, -- commercial statut
|
||||||
note_private text, --
|
note_private text, --
|
||||||
note_public text, --
|
note_public text, --
|
||||||
@ -79,8 +77,6 @@ create table llx_societe
|
|||||||
customer_bad tinyint DEFAULT 0, -- mauvais payeur 0/1
|
customer_bad tinyint DEFAULT 0, -- mauvais payeur 0/1
|
||||||
customer_rate real DEFAULT 0, -- taux fiabilite client (0 a 1)
|
customer_rate real DEFAULT 0, -- taux fiabilite client (0 a 1)
|
||||||
supplier_rate real DEFAULT 0, -- taux fiabilite fournisseur (0 a 1)
|
supplier_rate real DEFAULT 0, -- taux fiabilite fournisseur (0 a 1)
|
||||||
fk_user_creat integer NULL, -- utilisateur qui a cree l'info
|
|
||||||
fk_user_modif integer, -- utilisateur qui a modifie l'info
|
|
||||||
remise_client real DEFAULT 0, -- remise systematique pour le client
|
remise_client real DEFAULT 0, -- remise systematique pour le client
|
||||||
mode_reglement tinyint, -- mode de reglement
|
mode_reglement tinyint, -- mode de reglement
|
||||||
cond_reglement tinyint, -- condition de reglement
|
cond_reglement tinyint, -- condition de reglement
|
||||||
@ -99,10 +95,17 @@ create table llx_societe
|
|||||||
default_lang varchar(6), -- default language
|
default_lang varchar(6), -- default language
|
||||||
logo varchar(255) DEFAULT NULL,
|
logo varchar(255) DEFAULT NULL,
|
||||||
canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default)
|
canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default)
|
||||||
import_key varchar(14), -- import key
|
fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse
|
||||||
webservices_url varchar(255), -- supplier webservice url
|
webservices_url varchar(255), -- supplier webservice url
|
||||||
webservices_key varchar(128), -- supplier webservice key
|
webservices_key varchar(128), -- supplier webservice key
|
||||||
|
|
||||||
|
tms timestamp, -- last modification date
|
||||||
|
datec datetime, -- creation date
|
||||||
|
fk_user_creat integer NULL, -- utilisateur qui a cree l'info
|
||||||
|
fk_user_modif integer, -- utilisateur qui a modifie l'info
|
||||||
|
|
||||||
fk_multicurrency integer,
|
fk_multicurrency integer,
|
||||||
multicurrency_code varchar(255)
|
multicurrency_code varchar(255),
|
||||||
|
|
||||||
|
import_key varchar(14) -- import key
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user