From 1b0aec0847732d58da4a719afec45f7e99d14cf0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Mar 2019 20:51:07 +0100 Subject: [PATCH] Complete fields for template invoices --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 7 +++++++ htdocs/install/mysql/tables/llx_facturedet.sql | 8 ++++---- htdocs/install/mysql/tables/llx_facturedet_rec.sql | 7 +++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 5154d7311a9..7dd893b8dab 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -230,3 +230,10 @@ ALTER TABLE llx_bom_bom ADD INDEX idx_bom_bom_fk_product (fk_product); ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_rowid (rowid); ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_product (fk_product); ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_bom (fk_bom); + +ALTER TABLE llx_facturedet_rec ADD COLUMN buy_price_ht double(24,8) DEFAULT 0; +ALTER TABLE llx_facturedet_rec ADD COLUMN fk_product_fournisseur_price integer DEFAULT NULL; + +ALTER TABLE llx_facturedet_rec ADD COLUMN fk_user_author integer; +ALTER TABLE llx_facturedet_rec ADD COLUMN fk_user_modif integer; + diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql index ac7142c898d..deb52576a8a 100644 --- a/htdocs/install/mysql/tables/llx_facturedet.sql +++ b/htdocs/install/mysql/tables/llx_facturedet.sql @@ -55,16 +55,16 @@ create table llx_facturedet buy_price_ht double(24,8) DEFAULT 0, -- buying price. Note: this value is saved as an always positive value, even on credit notes (it is price we bought the product before selling it). fk_product_fournisseur_price integer DEFAULT NULL, -- reference of supplier price when line was added (may be used to update buy_price_ht current price when future invoice will be created) - fk_code_ventilation integer DEFAULT 0 NOT NULL, -- Id in table llx_accounting_bookeeping to know accounting account for product line - special_code integer DEFAULT 0, -- code for special lines (may be 1=transport, 2=ecotax, 3=option, moduleid=...) rang integer DEFAULT 0, -- position of line fk_contract_line integer NULL, -- id of contract line when invoice comes from contract lines + fk_unit integer DEFAULT NULL, -- id of the unit code import_key varchar(14), + fk_code_ventilation integer DEFAULT 0 NOT NULL, -- Id in table llx_accounting_bookeeping to know accounting account for product line + situation_percent real, -- % progression of lines invoicing - fk_prev_id integer, -- id of the line in the previous situation, - fk_unit integer DEFAULT NULL, -- id of the unit codeĀ” + fk_prev_id integer, -- id of the line in the previous situation fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec.sql b/htdocs/install/mysql/tables/llx_facturedet_rec.sql index ac79dfd891d..267abcd5053 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec.sql @@ -48,11 +48,18 @@ create table llx_facturedet_rec date_start_fill integer DEFAULT 0, -- 1=autofill the date_start of invoice with __INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__ date_end_fill integer DEFAULT 0, -- 1=autofill the date_start of invoice with __INVOICE_PREVIOUS_DATE_NEXT_INVOICE_AFTER_GEN__ info_bits integer DEFAULT 0, -- TVA NPR ou non + + buy_price_ht double(24,8) DEFAULT 0, -- buying price. Note: this value is saved as an always positive value, even on credit notes (it is price we bought the product before selling it). + fk_product_fournisseur_price integer DEFAULT NULL, -- reference of supplier price when line was added (may be used to update buy_price_ht current price when future invoice will be created) + special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales rang integer DEFAULT 0, -- ordre d'affichage fk_contract_line integer NULL, -- id of contract line when template invoice comes from contract lines fk_unit integer DEFAULT NULL, import_key varchar(14), + + fk_user_author integer, -- user making creation + fk_user_modif integer, -- user making last change fk_multicurrency integer, multicurrency_code varchar(255),