From 361a88a1c5b45c700398d7f609e726fdeef5b200 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Nov 2025 19:43:27 +0100 Subject: [PATCH] Add field email_sent_counter --- htdocs/install/mysql/migration/22.0.0-23.0.0.sql | 1 + htdocs/install/mysql/tables/llx_facture.sql | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql index 6e983bf0b12..28f874f8b2e 100644 --- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql +++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql @@ -133,6 +133,7 @@ ALTER TABLE llx_accounting_analytic_distribution ADD CONSTRAINT fk_accounting_an ALTER TABLE llx_facture ADD COLUMN dispute_status integer DEFAULT 0 after payment_reference; ALTER TABLE llx_facture ADD COLUMN ip varchar(250); ALTER TABLE llx_facture ADD COLUMN pos_print_counter integer DEFAULT 0; +ALTER TABLE llx_facture ADD COLUMN email_sent_counter integer DEFAULT 0; ALTER TABLE llx_commande ADD COLUMN ip varchar(250); ALTER TABLE llx_commande ADD COLUMN user_agent varchar(255); diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 4da315bfc98..23493a68ab3 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -68,7 +68,8 @@ create table llx_facture module_source varchar(32), -- name of module when invoice generated by a dedicated module (POS, ecommerce...) pos_source varchar(32), -- numero of POS terminal when order is generated by a POS module, IDsession@IDwebsite when invoice is generated for a website ecommerce. - pos_print_counter integer DEFAULT 0, -- counter used to track how many times the ticket was printed. + pos_print_counter integer DEFAULT 0, -- counter used to track how many times the invoice/receipt was printed. + email_sent_counter integer DEFAULT 0, -- counter used to track how many times the invoice/receipt was sent by email. fk_fac_rec_source integer, -- facture rec source fk_facture_source integer, -- facture origin if credit notes or replacement invoice