Fixed: Bad field of default value for fields into predefined/recuring
invoice tables.
This commit is contained in:
parent
253fd83aca
commit
55b7bb532d
@ -1136,6 +1136,9 @@ ALTER TABLE llx_facture_fourn MODIFY COLUMN ref VARCHAR(255);
|
|||||||
ALTER TABLE llx_facture_fourn MODIFY COLUMN ref_ext VARCHAR(255);
|
ALTER TABLE llx_facture_fourn MODIFY COLUMN ref_ext VARCHAR(255);
|
||||||
ALTER TABLE llx_facture_fourn MODIFY COLUMN ref_supplier VARCHAR(255);
|
ALTER TABLE llx_facture_fourn MODIFY COLUMN ref_supplier VARCHAR(255);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_rec ADD COLUMN revenuestamp double(24,8) DEFAULT 0;
|
||||||
|
ALTER TABLE llx_facturedet_rec MODIFY COLUMN tva_tx double(6,3);
|
||||||
|
ALTER TABLE llx_facturedet_rec ADD COLUMN fk_contract_line integer NULL;
|
||||||
|
|
||||||
-- This request make mysql drop (mysql bug, so we add it at end):
|
-- This request make mysql drop (mysql bug, so we add it at end):
|
||||||
--ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type(rowid);
|
--ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type(rowid);
|
||||||
|
|||||||
@ -65,6 +65,7 @@ create table llx_facture
|
|||||||
|
|
||||||
fk_account integer, -- bank account
|
fk_account integer, -- bank account
|
||||||
fk_currency varchar(3), -- currency code
|
fk_currency varchar(3), -- currency code
|
||||||
|
|
||||||
fk_cond_reglement integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...)
|
fk_cond_reglement integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...)
|
||||||
fk_mode_reglement integer, -- mode de reglement (Virement, Prelevement)
|
fk_mode_reglement integer, -- mode de reglement (Virement, Prelevement)
|
||||||
date_lim_reglement date, -- date limite de reglement
|
date_lim_reglement date, -- date limite de reglement
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2012-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
-- Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -31,17 +31,21 @@ create table llx_facture_rec
|
|||||||
remise real DEFAULT 0,
|
remise real DEFAULT 0,
|
||||||
remise_percent real DEFAULT 0,
|
remise_percent real DEFAULT 0,
|
||||||
remise_absolue real DEFAULT 0,
|
remise_absolue real DEFAULT 0,
|
||||||
|
|
||||||
tva double(24,8) DEFAULT 0,
|
tva double(24,8) DEFAULT 0,
|
||||||
localtax1 double(24,8) DEFAULT 0, -- amount localtax1
|
localtax1 double(24,8) DEFAULT 0, -- amount localtax1
|
||||||
localtax2 double(24,8) DEFAULT 0, -- amount localtax2
|
localtax2 double(24,8) DEFAULT 0, -- amount localtax2
|
||||||
|
revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp
|
||||||
total double(24,8) DEFAULT 0,
|
total double(24,8) DEFAULT 0,
|
||||||
total_ttc double(24,8) DEFAULT 0,
|
total_ttc double(24,8) DEFAULT 0,
|
||||||
|
|
||||||
fk_user_author integer, -- createur
|
fk_user_author integer, -- createur
|
||||||
|
|
||||||
fk_projet integer, -- projet auquel est associe la facture
|
fk_projet integer, -- projet auquel est associe la facture
|
||||||
fk_cond_reglement integer DEFAULT 0, -- condition de reglement
|
|
||||||
|
fk_cond_reglement integer DEFAULT 0, -- condition de reglement
|
||||||
fk_mode_reglement integer DEFAULT 0, -- mode de reglement (Virement, Prelevement)
|
fk_mode_reglement integer DEFAULT 0, -- mode de reglement (Virement, Prelevement)
|
||||||
date_lim_reglement date, -- date limite de reglement
|
date_lim_reglement date, -- date limite de reglement
|
||||||
|
|
||||||
note_private text,
|
note_private text,
|
||||||
note_public text,
|
note_public text,
|
||||||
@ -49,8 +53,9 @@ create table llx_facture_rec
|
|||||||
usenewprice integer DEFAULT 0,
|
usenewprice integer DEFAULT 0,
|
||||||
frequency integer,
|
frequency integer,
|
||||||
unit_frequency varchar(2) DEFAULT 'd',
|
unit_frequency varchar(2) DEFAULT 'd',
|
||||||
|
|
||||||
date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date)
|
date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date)
|
||||||
date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice)
|
date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice)
|
||||||
nb_gen_done integer DEFAULT NULL, -- nb of generation done (when an invoice is generated, this field must incremented)
|
nb_gen_done integer DEFAULT NULL, -- nb of generation done (when an invoice is generated, this field must incremented)
|
||||||
nb_gen_max integer DEFAULT NULL -- maximum number of generation
|
nb_gen_max integer DEFAULT NULL -- maximum number of generation
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2009-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
-- Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
-- Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
--
|
--
|
||||||
@ -28,23 +28,23 @@ create table llx_facturedet_rec
|
|||||||
product_type integer DEFAULT 0,
|
product_type integer DEFAULT 0,
|
||||||
label varchar(255) DEFAULT NULL,
|
label varchar(255) DEFAULT NULL,
|
||||||
description text,
|
description text,
|
||||||
tva_tx double(6,3) DEFAULT 19.6, -- taux tva
|
tva_tx double(6,3), -- taux tva
|
||||||
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate
|
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate
|
||||||
localtax1_type varchar(10) NULL, -- localtax1 type
|
localtax1_type varchar(10) NULL, -- localtax1 type
|
||||||
localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate
|
localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate
|
||||||
localtax2_type varchar(10) NULL, -- localtax2 type
|
localtax2_type varchar(10) NULL, -- localtax2 type
|
||||||
qty real, -- quantity
|
qty real, -- quantity
|
||||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
remise_percent real DEFAULT 0, -- pourcentage de remise
|
||||||
remise real DEFAULT 0, -- montant de la remise
|
remise real DEFAULT 0, -- montant de la remise
|
||||||
subprice double(24,8), -- prix avant remise
|
subprice double(24,8), -- prix avant remise
|
||||||
price double(24,8), -- prix final
|
price double(24,8), -- prix final
|
||||||
total_ht double(24,8), -- Total HT de la ligne toute quantity et incluant remise ligne et globale
|
total_ht double(24,8), -- Total HT de la ligne toute quantity et incluant remise ligne et globale
|
||||||
total_tva double(24,8), -- Total TVA de la ligne toute quantity et incluant remise ligne et globale
|
total_tva double(24,8), -- Total TVA de la ligne toute quantity et incluant remise ligne et globale
|
||||||
total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 for total quantity of line
|
total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 for total quantity of line
|
||||||
total_localtax2 double(24,8) DEFAULT 0, -- total LocalTax2 for total quantity of line
|
total_localtax2 double(24,8) DEFAULT 0, -- total LocalTax2 for total quantity of line
|
||||||
total_ttc double(24,8), -- Total TTC de la ligne toute quantity et incluant remise ligne et globale
|
total_ttc double(24,8), -- Total TTC de la ligne toute quantity et incluant remise ligne et globale
|
||||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||||
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
||||||
rang integer DEFAULT 0 -- ordre d'affichage
|
rang integer DEFAULT 0, -- ordre d'affichage
|
||||||
|
fk_contract_line integer NULL -- id of contract line when predefined invoice comes from contract lines
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user