From bc585238885d28fa98e2603eb2e0aec97561740c Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Fri, 25 Apr 2025 04:26:33 +0200 Subject: [PATCH] NEW Add field usenewcurrencyrate --- htdocs/install/mysql/migration/21.0.0-22.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_facture_fourn_rec.sql | 3 ++- htdocs/install/mysql/tables/llx_facture_rec.sql | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/21.0.0-22.0.0.sql b/htdocs/install/mysql/migration/21.0.0-22.0.0.sql index bb1b0f510ff..d78a09c7310 100644 --- a/htdocs/install/mysql/migration/21.0.0-22.0.0.sql +++ b/htdocs/install/mysql/migration/21.0.0-22.0.0.sql @@ -279,4 +279,7 @@ ALTER TABLE llx_societe_rib ADD COLUMN cci varchar(100) after iban_prefix; -- ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP INDEX idx_eventorganization_conferenceorboothattendee_ref; ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_confboothattendee(ref); +ALTER TABLE llx_facture_rec ADD COLUMN usenewcurrencyrate integer DEFAULT 0; +ALTER TABLE llx_facture_fourn_rec ADD COLUMN usenewcurrencyrate integer DEFAULT 0; + ALTER TABLE llx_don ADD COLUMN ip varchar(250); diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_rec.sql b/htdocs/install/mysql/tables/llx_facture_fourn_rec.sql index ad8d682b3f3..5321cc280e1 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_rec.sql @@ -65,6 +65,7 @@ create table llx_facture_fourn_rec -- Fields linked to the recurring behavior usenewprice integer DEFAULT 0, -- update invoice with current price of product instead of recorded price + usenewcurrencyrate integer DEFAULT 0, -- update invoice with last currency rate instead of recorded rate frequency integer, -- frequency (for example: 3 for every 3 month) unit_frequency varchar(2) DEFAULT 'm', -- 'm' for month (date_when must be a day <= 28), 'y' for year, ... @@ -74,5 +75,5 @@ create table llx_facture_fourn_rec nb_gen_max integer DEFAULT NULL, -- maximum number of generation auto_validate integer DEFAULT 0, -- 0 to create in draft, 1 to create and validate the new invoice generate_pdf integer DEFAULT 1 -- 0 disable pdf, 1 to generate pdf - + )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index c5139d352c5..7e49910ea60 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -66,7 +66,8 @@ create table llx_facture_rec multicurrency_total_ttc double(24,8) DEFAULT 0, usenewprice integer DEFAULT 0, -- update invoice with current price of product instead of recorded price - frequency integer, -- frequency (for example: 3 for every 3 month) + usenewcurrencyrate integer DEFAULT 0, -- update invoice with last currency rate instead of recorded rate + frequency integer, -- frequency (for example: 3 for every 3 month) unit_frequency varchar(2) DEFAULT 'm', -- 'm' for month (date_when must be a day <= 28), 'y' for year, ... rule_for_lines_dates varchar(255) DEFAULT 'prepaid',