';
echo $langs->trans('AutoFillDateFrom').' ';
+ if ($conf->global->INVOICE_REC_DATE_TO_YES) {
+ $line->date_start_fill = 1;
+ $line->date_end_fill = 1;
+ }
echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1);
echo ' - ';
echo $langs->trans('AutoFillDateTo').' ';
From 5f9805642327686ceb7d2893ec2e777132ddcd96 Mon Sep 17 00:00:00 2001
From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com>
Date: Tue, 21 Jun 2022 18:27:23 +0200
Subject: [PATCH 06/14] Update llx_adherent_type.sql
---
.../mysql/tables/llx_adherent_type.sql | 27 ++++++++++---------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql
index 243372c0452..4144d9b32b7 100644
--- a/htdocs/install/mysql/tables/llx_adherent_type.sql
+++ b/htdocs/install/mysql/tables/llx_adherent_type.sql
@@ -18,22 +18,23 @@
--
-- ===================================================================
--
--- statut
--- 0 : actif
--- 1 : inactif
+-- state / statut
+-- 0 : active / actif
+-- 1 : inactive / inactif
+--
create table llx_adherent_type
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
- entity integer DEFAULT 1 NOT NULL,
+ entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- statut smallint NOT NULL DEFAULT 0,
- libelle varchar(50) NOT NULL,
- morphy varchar(3) NOT NULL,
- duration varchar(6) DEFAULT NULL,
- subscription varchar(3) NOT NULL DEFAULT '1',
- amount double(24,8) DEFAULT NULL,
- vote varchar(3) NOT NULL DEFAULT '1',
- note text,
- mail_valid text
+ statut smallint NOT NULL DEFAULT 0, -- state 0 = active , 1 = inactive
+ libelle varchar(50) NOT NULL, -- label
+ morphy varchar(3) NOT NULL, -- moral and/or physical entity
+ duration varchar(6) DEFAULT NULL, -- (minimal) duration of membership
+ subscription varchar(3) NOT NULL DEFAULT '1', -- subscription with costs / fee or without / for free
+ amount double(24,8) DEFAULT NULL, -- membership fee
+ vote varchar(3) NOT NULL DEFAULT '1', -- entitled to vote
+ note text, -- description / comment
+ mail_valid text -- text for welcome email
)ENGINE=innodb;
From 924ef0a7db43b09ef553bd22fd52b7135c3e1f13 Mon Sep 17 00:00:00 2001
From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com>
Date: Tue, 21 Jun 2022 19:26:23 +0200
Subject: [PATCH 07/14] Update 15.0.0-16.0.0.sql
---
.../install/mysql/migration/15.0.0-16.0.0.sql | 317 ++++++++++--------
1 file changed, 168 insertions(+), 149 deletions(-)
diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
index 2d8b0a8cc17..b57cab5b4eb 100644
--- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
+++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
@@ -181,48 +181,48 @@ ALTER TABLE llx_stock_mouvement_extrafields ADD INDEX idx_stock_mouvement_extraf
CREATE TABLE llx_facture_fourn_rec
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
- titre varchar(200) NOT NULL,
- ref_supplier varchar(180) NOT NULL,
- entity integer DEFAULT 1 NOT NULL,
- fk_soc integer NOT NULL,
+ titre varchar(200) NOT NULL,
+ ref_supplier varchar(180) NOT NULL,
+ entity integer DEFAULT 1 NOT NULL,
+ fk_soc integer NOT NULL,
datec datetime,
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- suspended integer DEFAULT 0,
- libelle varchar(255),
- amount double(24, 8) DEFAULT 0 NOT NULL,
- remise real DEFAULT 0,
- vat_src_code varchar(10) DEFAULT '',
- localtax1 double(24,8) DEFAULT 0,
- localtax2 double(24,8) DEFAULT 0,
- total_ht double(24,8) DEFAULT 0,
- total_tva double(24,8) DEFAULT 0,
- total_ttc double(24,8) DEFAULT 0,
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ suspended integer DEFAULT 0,
+ libelle varchar(255),
+ amount double(24,8) DEFAULT 0 NOT NULL,
+ remise real DEFAULT 0,
+ vat_src_code varchar(10) DEFAULT '',
+ localtax1 double(24,8) DEFAULT 0,
+ localtax2 double(24,8) DEFAULT 0,
+ total_ht double(24,8) DEFAULT 0,
+ total_tva double(24,8) DEFAULT 0,
+ total_ttc double(24,8) DEFAULT 0,
fk_user_author integer,
fk_user_modif integer,
fk_projet integer,
fk_account integer,
- fk_cond_reglement integer,
- fk_mode_reglement integer,
+ fk_cond_reglement integer,
+ fk_mode_reglement integer,
date_lim_reglement date,
note_private text,
note_public text,
modelpdf varchar(255),
fk_multicurrency integer,
multicurrency_code varchar(3),
- multicurrency_tx double(24,8) DEFAULT 1,
- multicurrency_total_ht double(24,8) DEFAULT 0,
- multicurrency_total_tva double(24,8) DEFAULT 0,
- multicurrency_total_ttc double(24,8) DEFAULT 0,
- usenewprice integer DEFAULT 0,
+ multicurrency_tx double(24,8) DEFAULT 1,
+ multicurrency_total_ht double(24,8) DEFAULT 0,
+ multicurrency_total_tva double(24,8) DEFAULT 0,
+ multicurrency_total_ttc double(24,8) DEFAULT 0,
+ usenewprice integer DEFAULT 0,
frequency integer,
- unit_frequency varchar(2) DEFAULT 'm',
- date_when datetime DEFAULT NULL,
- date_last_gen datetime DEFAULT NULL,
- nb_gen_done integer DEFAULT NULL,
- nb_gen_max integer DEFAULT NULL,
- auto_validate integer DEFAULT 0,
- generate_pdf integer DEFAULT 1
-)ENGINE=innodb;
+ unit_frequency varchar(2) DEFAULT 'm',
+ date_when datetime DEFAULT NULL,
+ date_last_gen datetime DEFAULT NULL,
+ nb_gen_done integer DEFAULT NULL,
+ nb_gen_max integer DEFAULT NULL,
+ auto_validate integer DEFAULT 0,
+ generate_pdf integer DEFAULT 1
+) ENGINE=innodb;
ALTER TABLE llx_facture_fourn_rec ADD UNIQUE INDEX uk_facture_fourn_rec_ref (titre, entity);
ALTER TABLE llx_facture_fourn_rec ADD UNIQUE INDEX uk_facture_fourn_rec_ref_supplier (ref_supplier, fk_soc, entity);
@@ -251,23 +251,23 @@ CREATE TABLE llx_facture_fourn_det_rec
fk_parent_line integer NULL,
fk_product integer NULL,
ref varchar(50),
- label varchar(255) DEFAULT NULL,
+ label varchar(255) DEFAULT NULL,
description text,
pu_ht double(24,8),
pu_ttc double(24,8),
qty real,
- remise_percent real DEFAULT 0,
- fk_remise_except integer NULL,
- vat_src_code varchar(10) DEFAULT '',
+ remise_percent real DEFAULT 0,
+ fk_remise_except integer NULL,
+ vat_src_code varchar(10) DEFAULT '',
tva_tx double(7,4),
- localtax1_tx double(7,4) DEFAULT 0,
- localtax1_type varchar(10) NULL,
- localtax2_tx double(7,4) DEFAULT 0,
- localtax2_type varchar(10) NULL,
+ localtax1_tx double(7,4) DEFAULT 0,
+ localtax1_type varchar(10) NULL,
+ localtax2_tx double(7,4) DEFAULT 0,
+ localtax2_type varchar(10) NULL,
total_ht double(24,8),
total_tva double(24,8),
- total_localtax1 double(24,8) DEFAULT 0,
- total_localtax2 double(24,8) DEFAULT 0,
+ total_localtax1 double(24,8) DEFAULT 0,
+ total_localtax2 double(24,8) DEFAULT 0,
total_ttc double(24,8),
product_type integer DEFAULT 0,
date_start integer DEFAULT NULL,
@@ -285,17 +285,20 @@ CREATE TABLE llx_facture_fourn_det_rec
multicurrency_total_ht double(24,8) DEFAULT 0,
multicurrency_total_tva double(24,8) DEFAULT 0,
multicurrency_total_ttc double(24,8) DEFAULT 0
-)ENGINE=innodb;
+) ENGINE=innodb;
+
ALTER TABLE llx_facture_fourn_det_rec ADD CONSTRAINT fk_facture_fourn_det_rec_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid);
+
CREATE TABLE llx_facture_fourn_det_rec_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
- import_key varchar(14) -- import key
-)ENGINE=innodb;
+ import_key varchar(14) -- import key
+) ENGINE=innodb;
+
ALTER TABLE llx_facture_fourn_det_rec_extrafields ADD INDEX idx_facture_fourn_det_rec_extrafields (fk_object);
@@ -314,7 +317,8 @@ ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN position INTEGER NOT NU
ALTER TABLE llx_advtargetemailing RENAME TO llx_mailing_advtarget;
-ALTER TABLE llx_mailing ADD UNIQUE INDEX uk_mailing(titre, entity);
+ALTER TABLE llx_mailing ADD UNIQUE INDEX uk_mailing (titre, entity);
+
create table llx_inventory_extrafields
(
@@ -324,6 +328,7 @@ create table llx_inventory_extrafields
import_key varchar(14) -- import key
) ENGINE=innodb;
+
ALTER TABLE llx_inventory_extrafields ADD INDEX idx_inventory_extrafields (fk_object);
ALTER TABLE llx_reception MODIFY COLUMN ref_supplier varchar(128);
@@ -364,136 +369,149 @@ ALTER TABLE llx_asset ADD COLUMN model_pdf varchar(255) AFTER import_key;
DROP TABLE llx_asset_type;
+
CREATE TABLE llx_c_asset_disposal_type
(
- rowid integer AUTO_INCREMENT PRIMARY KEY,
- entity integer NOT NULL DEFAULT 1,
- code varchar(16) NOT NULL,
- label varchar(50) NOT NULL,
- active integer DEFAULT 1 NOT NULL
-)ENGINE=innodb;
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ entity integer NOT NULL DEFAULT 1,
+ code varchar(16) NOT NULL,
+ label varchar(50) NOT NULL,
+ active integer NOT NULL DEFAULT 1
+) ENGINE=innodb;
-CREATE TABLE llx_asset_accountancy_codes_economic(
- rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+
+CREATE TABLE llx_asset_accountancy_codes_economic
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ fk_asset integer,
+ fk_asset_model integer,
+
+ asset varchar(32),
+ depreciation_asset varchar(32),
+ depreciation_expense varchar(32),
+ value_asset_sold varchar(32),
+ receivable_on_assignment varchar(32),
+ proceeds_from_sales varchar(32),
+ vat_collected varchar(32),
+ vat_deductible varchar(32),
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_modif integer
+) ENGINE=innodb;
+
+
+CREATE TABLE llx_asset_accountancy_codes_fiscal
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
fk_asset integer,
fk_asset_model integer,
- asset varchar(32),
- depreciation_asset varchar(32),
- depreciation_expense varchar(32),
- value_asset_sold varchar(32),
- receivable_on_assignment varchar(32),
- proceeds_from_sales varchar(32),
- vat_collected varchar(32),
- vat_deductible varchar(32),
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- fk_user_modif integer
-) ENGINE=innodb;
-
-CREATE TABLE llx_asset_accountancy_codes_fiscal(
- rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- fk_asset integer,
- fk_asset_model integer,
-
- accelerated_depreciation varchar(32),
+ accelerated_depreciation varchar(32),
endowment_accelerated_depreciation varchar(32),
provision_accelerated_depreciation varchar(32),
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- fk_user_modif integer
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_modif integer
) ENGINE=innodb;
-CREATE TABLE llx_asset_depreciation_options_economic(
- rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- fk_asset integer,
- fk_asset_model integer,
- depreciation_type smallint DEFAULT 0 NOT NULL, -- 0:linear, 1:degressive, 2:exceptional
- accelerated_depreciation_option integer, -- activate accelerated depreciation mode (fiscal)
+CREATE TABLE llx_asset_depreciation_options_economic
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ fk_asset integer,
+ fk_asset_model integer,
- degressive_coefficient double(24,8),
- duration smallint NOT NULL,
- duration_type smallint DEFAULT 0 NOT NULL, -- 0:annual, 1:monthly, 2:daily
+ depreciation_type smallint DEFAULT 0 NOT NULL, -- 0:linear, 1:degressive, 2:exceptional
+ accelerated_depreciation_option integer, -- activate accelerated depreciation mode (fiscal)
- amount_base_depreciation_ht double(24,8),
- amount_base_deductible_ht double(24,8),
- total_amount_last_depreciation_ht double(24,8),
+ degressive_coefficient double(24,8),
+ duration smallint NOT NULL,
+ duration_type smallint DEFAULT 0 NOT NULL, -- 0:annual, 1:monthly, 2:daily
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- fk_user_modif integer
+ amount_base_depreciation_ht double(24,8),
+ amount_base_deductible_ht double(24,8),
+ total_amount_last_depreciation_ht double(24,8),
+
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_modif integer
) ENGINE=innodb;
-CREATE TABLE llx_asset_depreciation_options_fiscal(
- rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- fk_asset integer,
- fk_asset_model integer,
- depreciation_type smallint DEFAULT 0 NOT NULL, -- 0:linear, 1:degressive, 2:exceptional
+CREATE TABLE llx_asset_depreciation_options_fiscal
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ fk_asset integer,
+ fk_asset_model integer,
- degressive_coefficient double(24,8),
- duration smallint NOT NULL,
- duration_type smallint DEFAULT 0 NOT NULL, -- 0:annual, 1:monthly, 2:daily
+ depreciation_type smallint DEFAULT 0 NOT NULL, -- 0:linear, 1:degressive, 2:exceptional
- amount_base_depreciation_ht double(24,8),
- amount_base_deductible_ht double(24,8),
- total_amount_last_depreciation_ht double(24,8),
+ degressive_coefficient double(24,8),
+ duration smallint NOT NULL,
+ duration_type smallint DEFAULT 0 NOT NULL, -- 0:annual, 1:monthly, 2:daily
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- fk_user_modif integer
+ amount_base_depreciation_ht double(24,8),
+ amount_base_deductible_ht double(24,8),
+ total_amount_last_depreciation_ht double(24,8),
+
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_modif integer
) ENGINE=innodb;
-CREATE TABLE llx_asset_depreciation(
- rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- fk_asset integer NOT NULL,
- depreciation_mode varchar(255) NOT NULL, -- (economic, fiscal or other)
+CREATE TABLE llx_asset_depreciation
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- ref varchar(255) NOT NULL,
- depreciation_date datetime NOT NULL,
- depreciation_ht double(24,8) NOT NULL,
- cumulative_depreciation_ht double(24,8) NOT NULL,
+ fk_asset integer NOT NULL,
+ depreciation_mode varchar(255) NOT NULL, -- (economic, fiscal or other)
- accountancy_code_debit varchar(32),
- accountancy_code_credit varchar(32),
+ ref varchar(255) NOT NULL,
+ depreciation_date datetime NOT NULL,
+ depreciation_ht double(24,8) NOT NULL,
+ cumulative_depreciation_ht double(24,8) NOT NULL,
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- fk_user_modif integer
+ accountancy_code_debit varchar(32),
+ accountancy_code_credit varchar(32),
+
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_modif integer
) ENGINE=innodb;
+
CREATE TABLE llx_asset_model(
- rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- entity integer DEFAULT 1 NOT NULL, -- multi company id
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ entity integer DEFAULT 1 NOT NULL, -- multi company id
ref varchar(128) NOT NULL,
label varchar(255) NOT NULL,
- asset_type smallint NOT NULL,
- fk_pays integer DEFAULT 0,
+ asset_type smallint NOT NULL,
+ fk_pays integer DEFAULT 0,
- note_public text,
- note_private text,
- date_creation datetime NOT NULL,
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- fk_user_creat integer NOT NULL,
- fk_user_modif integer,
- import_key varchar(14),
- status smallint NOT NULL
+ note_public text,
+ note_private text,
+ date_creation datetime NOT NULL,
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_creat integer NOT NULL,
+ fk_user_modif integer,
+ import_key varchar(14),
+ status smallint NOT NULL
) ENGINE=innodb;
CREATE TABLE llx_asset_model_extrafields
(
- rowid integer AUTO_INCREMENT PRIMARY KEY,
- tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;
+
ALTER TABLE llx_c_asset_disposal_type ADD UNIQUE INDEX uk_c_asset_disposal_type(code, entity);
ALTER TABLE llx_asset ADD INDEX idx_asset_fk_asset_model (fk_asset_model);
ALTER TABLE llx_asset ADD INDEX idx_asset_fk_disposal_type (fk_disposal_type);
-ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
-ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_disposal_type FOREIGN KEY (fk_disposal_type) REFERENCES llx_c_asset_disposal_type (rowid);
+ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
+ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_disposal_type FOREIGN KEY (fk_disposal_type) REFERENCES llx_c_asset_disposal_type (rowid);
ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
@@ -501,33 +519,33 @@ ALTER TABLE llx_asset_accountancy_codes_economic ADD INDEX idx_asset_ace_rowid (
ALTER TABLE llx_asset_accountancy_codes_economic ADD UNIQUE uk_asset_ace_fk_asset (fk_asset);
ALTER TABLE llx_asset_accountancy_codes_economic ADD UNIQUE uk_asset_ace_fk_asset_model (fk_asset_model);
-ALTER TABLE llx_asset_accountancy_codes_economic ADD CONSTRAINT fk_asset_ace_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
+ALTER TABLE llx_asset_accountancy_codes_economic ADD CONSTRAINT fk_asset_ace_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
ALTER TABLE llx_asset_accountancy_codes_economic ADD CONSTRAINT fk_asset_ace_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
-ALTER TABLE llx_asset_accountancy_codes_economic ADD CONSTRAINT fk_asset_ace_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_accountancy_codes_economic ADD CONSTRAINT fk_asset_ace_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset_accountancy_codes_fiscal ADD INDEX idx_asset_acf_rowid (rowid);
ALTER TABLE llx_asset_accountancy_codes_fiscal ADD UNIQUE uk_asset_acf_fk_asset (fk_asset);
ALTER TABLE llx_asset_accountancy_codes_fiscal ADD UNIQUE uk_asset_acf_fk_asset_model (fk_asset_model);
-ALTER TABLE llx_asset_accountancy_codes_fiscal ADD CONSTRAINT fk_asset_acf_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
-ALTER TABLE llx_asset_accountancy_codes_fiscal ADD CONSTRAINT fk_asset_acf_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
-ALTER TABLE llx_asset_accountancy_codes_fiscal ADD CONSTRAINT fk_asset_acf_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_accountancy_codes_fiscal ADD CONSTRAINT fk_asset_acf_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
+ALTER TABLE llx_asset_accountancy_codes_fiscal ADD CONSTRAINT fk_asset_acf_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
+ALTER TABLE llx_asset_accountancy_codes_fiscal ADD CONSTRAINT fk_asset_acf_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset_depreciation_options_economic ADD INDEX idx_asset_doe_rowid (rowid);
ALTER TABLE llx_asset_depreciation_options_economic ADD UNIQUE uk_asset_doe_fk_asset (fk_asset);
ALTER TABLE llx_asset_depreciation_options_economic ADD UNIQUE uk_asset_doe_fk_asset_model (fk_asset_model);
-ALTER TABLE llx_asset_depreciation_options_economic ADD CONSTRAINT fk_asset_doe_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
+ALTER TABLE llx_asset_depreciation_options_economic ADD CONSTRAINT fk_asset_doe_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
ALTER TABLE llx_asset_depreciation_options_economic ADD CONSTRAINT fk_asset_doe_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
-ALTER TABLE llx_asset_depreciation_options_economic ADD CONSTRAINT fk_asset_doe_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_depreciation_options_economic ADD CONSTRAINT fk_asset_doe_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset_depreciation_options_fiscal ADD INDEX idx_asset_dof_rowid (rowid);
ALTER TABLE llx_asset_depreciation_options_fiscal ADD UNIQUE uk_asset_dof_fk_asset (fk_asset);
ALTER TABLE llx_asset_depreciation_options_fiscal ADD UNIQUE uk_asset_dof_fk_asset_model (fk_asset_model);
-ALTER TABLE llx_asset_depreciation_options_fiscal ADD CONSTRAINT fk_asset_dof_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
+ALTER TABLE llx_asset_depreciation_options_fiscal ADD CONSTRAINT fk_asset_dof_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
ALTER TABLE llx_asset_depreciation_options_fiscal ADD CONSTRAINT fk_asset_dof_asset_model FOREIGN KEY (fk_asset_model) REFERENCES llx_asset_model (rowid);
-ALTER TABLE llx_asset_depreciation_options_fiscal ADD CONSTRAINT fk_asset_dof_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_depreciation_options_fiscal ADD CONSTRAINT fk_asset_dof_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset_depreciation ADD INDEX idx_asset_depreciation_rowid (rowid);
ALTER TABLE llx_asset_depreciation ADD INDEX idx_asset_depreciation_fk_asset (fk_asset);
@@ -535,8 +553,8 @@ ALTER TABLE llx_asset_depreciation ADD INDEX idx_asset_depreciation_depreciation
ALTER TABLE llx_asset_depreciation ADD INDEX idx_asset_depreciation_ref (ref);
ALTER TABLE llx_asset_depreciation ADD UNIQUE uk_asset_depreciation_fk_asset (fk_asset, depreciation_mode, ref);
-ALTER TABLE llx_asset_depreciation ADD CONSTRAINT fk_asset_depreciation_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
-ALTER TABLE llx_asset_depreciation ADD CONSTRAINT fk_asset_depreciation_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_depreciation ADD CONSTRAINT fk_asset_depreciation_asset FOREIGN KEY (fk_asset) REFERENCES llx_asset (rowid);
+ALTER TABLE llx_asset_depreciation ADD CONSTRAINT fk_asset_depreciation_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset_model ADD INDEX idx_asset_model_rowid (rowid);
ALTER TABLE llx_asset_model ADD INDEX idx_asset_model_ref (ref);
@@ -544,8 +562,8 @@ ALTER TABLE llx_asset_model ADD INDEX idx_asset_model_pays (fk_pays);
ALTER TABLE llx_asset_model ADD INDEX idx_asset_model_entity (entity);
ALTER TABLE llx_asset_model ADD UNIQUE INDEX uk_asset_model (entity, ref);
-ALTER TABLE llx_asset_model ADD CONSTRAINT fk_asset_model_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid);
-ALTER TABLE llx_asset_model ADD CONSTRAINT fk_asset_model_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_model ADD CONSTRAINT fk_asset_model_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid);
+ALTER TABLE llx_asset_model ADD CONSTRAINT fk_asset_model_user_modif FOREIGN KEY (fk_user_modif) REFERENCES llx_user (rowid);
ALTER TABLE llx_asset_model_extrafields ADD INDEX idx_asset_model_extrafields (fk_object);
@@ -581,10 +599,11 @@ UPDATE llx_c_availability SET type_duration = 'w', qty = 4 WHERE code = 'AV_4W';
-- Deposit generation helper with specific payment terms
-ALTER TABLE llx_c_payment_term ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER decalage;
-ALTER TABLE llx_societe ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER cond_reglement;
-ALTER TABLE llx_propal ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement;
-ALTER TABLE llx_commande ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement;
+ALTER TABLE llx_c_payment_term ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER decalage;
+ALTER TABLE llx_societe ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER cond_reglement;
+ALTER TABLE llx_propal ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement;
+ALTER TABLE llx_commande ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement;
+
INSERT INTO llx_c_payment_term(code, sortorder, active, libelle, libelle_facture, type_cdr, nbjour, deposit_percent) values ('DEP30PCTDEL', 13, 0, '__DEPOSIT_PERCENT__% deposit', '__DEPOSIT_PERCENT__% deposit, remainder on delivery', 0, 1, '30');
@@ -599,13 +618,13 @@ DELETE FROM llx_boxes_def WHERE file IN ('box_bom.php@bom', 'box_bom.php', 'box_
ALTER TABLE llx_takepos_floor_tables ADD UNIQUE(entity,label);
-ALTER TABLE llx_partnership ADD COLUMN url_to_check varchar(255);
-ALTER TABLE llx_c_partnership_type ADD COLUMN keyword varchar(128);
+ALTER TABLE llx_partnership ADD COLUMN url_to_check varchar(255);
+ALTER TABLE llx_c_partnership_type ADD COLUMN keyword varchar(128);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN firstname varchar(100);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN lastname varchar(100);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN email_company varchar(128) after email;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN firstname varchar(100);
+ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN lastname varchar(100);
+ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN email_company varchar(128) after email;
ALTER TABLE llx_c_email_template ADD COLUMN email_from varchar(255);
From 1f7fc7a2ae015bdd2138cef5d4d1f843b1032346 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?=
Date: Tue, 21 Jun 2022 20:25:25 +0200
Subject: [PATCH 08/14] getDolGlobalString
---
htdocs/accountancy/admin/export.php | 2 +-
htdocs/accountancy/admin/index.php | 4 ++--
htdocs/admin/bom.php | 2 +-
htdocs/admin/chequereceipts.php | 2 +-
htdocs/admin/commande.php | 2 +-
htdocs/admin/compta.php | 2 +-
htdocs/admin/contract.php | 2 +-
htdocs/admin/dav.php | 2 +-
htdocs/admin/delivery.php | 2 +-
htdocs/admin/expedition.php | 2 +-
htdocs/admin/expensereport.php | 2 +-
htdocs/admin/facture.php | 2 +-
htdocs/admin/fichinter.php | 2 +-
htdocs/admin/holiday.php | 2 +-
htdocs/admin/loan.php | 2 +-
htdocs/admin/mrp.php | 2 +-
htdocs/admin/propal.php | 2 +-
htdocs/admin/reception_setup.php | 2 +-
htdocs/admin/stocktransfer.php | 4 ++--
htdocs/admin/supplier_invoice.php | 2 +-
htdocs/admin/supplier_order.php | 2 +-
htdocs/admin/supplier_proposal.php | 2 +-
htdocs/admin/website_options.php | 4 ++--
htdocs/admin/workstation.php | 4 ++--
htdocs/hrm/admin/admin_hrm.php | 2 +-
htdocs/intracommreport/admin/intracommreport.php | 4 ++--
htdocs/recruitment/admin/setup.php | 4 ++--
htdocs/recruitment/admin/setup_candidatures.php | 4 ++--
htdocs/salaries/admin/salaries.php | 2 +-
htdocs/takepos/admin/receipt.php | 4 ++--
htdocs/zapier/admin/setup.php | 4 ++--
31 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php
index 430c7b6abae..1df40468c61 100644
--- a/htdocs/accountancy/admin/export.php
+++ b/htdocs/accountancy/admin/export.php
@@ -211,7 +211,7 @@ if ($num) {
// Value
print '';
- print ' ';
+ print ' ';
print ' ';
}
}
diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php
index 309dc094e82..e53c2a36816 100644
--- a/htdocs/accountancy/admin/index.php
+++ b/htdocs/accountancy/admin/index.php
@@ -358,7 +358,7 @@ foreach ($list as $key) {
print ''.$label.' ';
// Value
print '';
- print ' ';
+ print ' ';
print ' ';
print '';
@@ -414,7 +414,7 @@ foreach ($list_binding as $key) {
$array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear"));
print $form->selectarray($key, $array, (isset($conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER) ? $conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER : 0));
} else {
- print ' ';
+ print ' ';
}
print '';
diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php
index dc56d3ae79f..daa3db54f0d 100644
--- a/htdocs/admin/bom.php
+++ b/htdocs/admin/bom.php
@@ -453,7 +453,7 @@ print '';
print $form->textwithpicto($langs->trans("FreeLegalTextOnBOMs"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'BOM_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php
index 3ba8c3b854a..3550697a8b0 100644
--- a/htdocs/admin/chequereceipts.php
+++ b/htdocs/admin/chequereceipts.php
@@ -261,7 +261,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnChequeReceipts"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'BANK_CHEQUERECEIPT_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index f4afd27d46b..e7496c08db8 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -612,7 +612,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnOrders"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'ORDER_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index 047b87ff014..d215125d51e 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -179,7 +179,7 @@ foreach ($list as $key) {
// Value
print ' ';
- print ' ';
+ print ' ';
print ' ';
}
diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php
index 0c8aba5ae2d..2f04222bb64 100644
--- a/htdocs/admin/contract.php
+++ b/htdocs/admin/contract.php
@@ -445,7 +445,7 @@ print $form->textwithpicto($langs->trans("FreeLegalTextOnContracts"), $langs->tr
print ' ';
$variablename = 'CONTRACT_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php
index e12848e3de1..698bb187d67 100644
--- a/htdocs/admin/dav.php
+++ b/htdocs/admin/dav.php
@@ -105,7 +105,7 @@ if ($action == 'edit') {
} elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR') {
print $form->selectyesno($key, $conf->global->$key, 1);
} else {
- print ' ';
+ print ' ';
}
print '';
}
diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php
index 6f0f4c1b415..6b9653f119d 100644
--- a/htdocs/admin/delivery.php
+++ b/htdocs/admin/delivery.php
@@ -434,7 +434,7 @@ print '';
print $form->textwithpicto($langs->trans("FreeLegalTextOnDeliveryReceipts"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'DELIVERY_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 12e0d0a6d01..60afa5a692e 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -441,7 +441,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnShippings"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'SHIPPING_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php
index fc63940f0b8..95eb4073a29 100644
--- a/htdocs/admin/expensereport.php
+++ b/htdocs/admin/expensereport.php
@@ -456,7 +456,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnExpenseReports"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'EXPENSEREPORT_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 599aac27c3f..6cf06a4198f 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -743,7 +743,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'INVOICE_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index c95f354a189..88d9eda9b18 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -507,7 +507,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnInterventions"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'FICHINTER_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php
index 7b0aa577a87..adb8e616cad 100644
--- a/htdocs/admin/holiday.php
+++ b/htdocs/admin/holiday.php
@@ -538,7 +538,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
print ' ';
$variablename = 'HOLIDAY_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php
index 59b7eb8b463..72b2a15d678 100644
--- a/htdocs/admin/loan.php
+++ b/htdocs/admin/loan.php
@@ -107,7 +107,7 @@ foreach ($list as $key) {
if (!empty($conf->accounting->enabled)) {
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1);
} else {
- print ' ';
+ print ' ';
}
print ' ';
}
diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php
index fac6a3f3d41..aa905a0b030 100644
--- a/htdocs/admin/mrp.php
+++ b/htdocs/admin/mrp.php
@@ -446,7 +446,7 @@ print '';
print $form->textwithpicto($langs->trans("FreeLegalTextOnMOs"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'MRP_MO_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 3bc745a1101..f5d7496a181 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -675,7 +675,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnProposal"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'PROPOSAL_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php
index 26300ece329..fcd0910ff49 100644
--- a/htdocs/admin/reception_setup.php
+++ b/htdocs/admin/reception_setup.php
@@ -455,7 +455,7 @@ print $form->textwithpicto($langs->trans("FreeLegalTextOnReceptions"), $langs->t
$variablename='RECEPTION_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
- print '';
+ print '';
}
else
{
diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php
index 541947bf442..0e504ec26f1 100644
--- a/htdocs/admin/stocktransfer.php
+++ b/htdocs/admin/stocktransfer.php
@@ -194,7 +194,7 @@ print ''.$langs->trans("StockTransferSetupPage").'
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' ';
+ print ' ';
}
print '';
@@ -217,7 +217,7 @@ print ''.$langs->trans("StockTransferSetupPage").'
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' '.$conf->global->$key.' ';
+ print ' '.getDolGlobalString($key).' ';
}
print '';
diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php
index 40fe58f68d6..9d94410d428 100644
--- a/htdocs/admin/supplier_invoice.php
+++ b/htdocs/admin/supplier_invoice.php
@@ -457,7 +457,7 @@ print '';
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'SUPPLIER_INVOICE_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php
index 75f2badfda5..f0382d58838 100644
--- a/htdocs/admin/supplier_order.php
+++ b/htdocs/admin/supplier_order.php
@@ -505,7 +505,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnOrders"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'SUPPLIER_ORDER_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php
index 80f2c6a62f4..cd2706a8a4f 100644
--- a/htdocs/admin/supplier_proposal.php
+++ b/htdocs/admin/supplier_proposal.php
@@ -474,7 +474,7 @@ print ' ';
print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").' '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
$variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php
index f6c92888384..1f5ebaec4c6 100644
--- a/htdocs/admin/website_options.php
+++ b/htdocs/admin/website_options.php
@@ -112,7 +112,7 @@ if ($action == 'edit') {
foreach ($arrayofparameters as $key => $val) {
print ' ';
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
- print ' ';
+ print ' ';
}
print '';
@@ -130,7 +130,7 @@ if ($action == 'edit') {
foreach ($arrayofparameters as $key => $val) {
print '';
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
- print ' '.$conf->global->$key.' ';
+ print ''.getDolGlobalString($key).' ';
}
print '';
diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php
index 6ac7a425246..bdd7ba662cd 100644
--- a/htdocs/admin/workstation.php
+++ b/htdocs/admin/workstation.php
@@ -188,7 +188,7 @@ if ($action == 'edit') {
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' ';
+ print ' ';
}
print '';
@@ -209,7 +209,7 @@ if ($action == 'edit') {
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' '.$conf->global->$key.' ';
+ print ''.getDolGlobalString($key).' ';
}
print '';
diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php
index 810c0da870d..6763fb43f8e 100644
--- a/htdocs/hrm/admin/admin_hrm.php
+++ b/htdocs/hrm/admin/admin_hrm.php
@@ -109,7 +109,7 @@ foreach ($list as $key) {
// Value
print '';
- print ' ';
+ print ' ';
print ' ';
}
diff --git a/htdocs/intracommreport/admin/intracommreport.php b/htdocs/intracommreport/admin/intracommreport.php
index 13231c43af2..3185e8a030e 100644
--- a/htdocs/intracommreport/admin/intracommreport.php
+++ b/htdocs/intracommreport/admin/intracommreport.php
@@ -117,7 +117,7 @@ foreach ($list_DEB as $key) {
print ''.$label.' ';
// Value
print '';
- print ' ';
+ print ' ';
print ' ';
print '';
@@ -181,7 +181,7 @@ foreach ($list_DES as $key) {
print ''.$label.' ';
// Value
print '';
- print ' ';
+ print ' ';
print ' ';
print '';
diff --git a/htdocs/recruitment/admin/setup.php b/htdocs/recruitment/admin/setup.php
index 1ef8fa544ad..c2cd40f6b6d 100644
--- a/htdocs/recruitment/admin/setup.php
+++ b/htdocs/recruitment/admin/setup.php
@@ -229,7 +229,7 @@ if ($action == 'edit') {
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' ';
+ print ' ';
}
print '';
@@ -250,7 +250,7 @@ if ($action == 'edit') {
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' '.$conf->global->$key.' ';
+ print ''.getDolGlobalString($key).' ';
}
print '';
diff --git a/htdocs/recruitment/admin/setup_candidatures.php b/htdocs/recruitment/admin/setup_candidatures.php
index 58172c2e767..1ab24288401 100644
--- a/htdocs/recruitment/admin/setup_candidatures.php
+++ b/htdocs/recruitment/admin/setup_candidatures.php
@@ -226,7 +226,7 @@ if ($action == 'edit') {
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' ';
+ print ' ';
}
print '';
@@ -247,7 +247,7 @@ if ($action == 'edit') {
print '';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
print $form->textwithpicto($langs->trans($key), $tooltiphelp);
- print ' '.$conf->global->$key.' ';
+ print ''.getDolGlobalString($key).' ';
}
print '';
diff --git a/htdocs/salaries/admin/salaries.php b/htdocs/salaries/admin/salaries.php
index 1c9eeec6464..f69e17336c6 100644
--- a/htdocs/salaries/admin/salaries.php
+++ b/htdocs/salaries/admin/salaries.php
@@ -122,7 +122,7 @@ foreach ($list as $key) {
if (!empty($conf->accounting->enabled)) {
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1);
} else {
- print ' ';
+ print ' ';
}
print '';
}
diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php
index 8ba37a69ab3..2d21046357c 100644
--- a/htdocs/takepos/admin/receipt.php
+++ b/htdocs/takepos/admin/receipt.php
@@ -192,7 +192,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print '';
$variablename = 'TAKEPOS_HEADER';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
@@ -205,7 +205,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print ' ';
$variablename = 'TAKEPOS_FOOTER';
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
- print '';
+ print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
diff --git a/htdocs/zapier/admin/setup.php b/htdocs/zapier/admin/setup.php
index 08d2c1703a8..0d3cf64c54f 100644
--- a/htdocs/zapier/admin/setup.php
+++ b/htdocs/zapier/admin/setup.php
@@ -88,7 +88,7 @@ if ($action == 'edit') {
foreach ($arrayofparameters as $key => $val) {
print ' ';
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
- print ' ';
+ print ' ';
}
print '';
@@ -106,7 +106,7 @@ if ($action == 'edit') {
foreach ($arrayofparameters as $key => $val) {
print '';
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
- print ' '.$conf->global->$key.' ';
+ print ''.getDolGlobalString($key).' ';
}
print '';
From 62c171c26de9292be30d4aac550ff27cc57ff6d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?=
Date: Tue, 21 Jun 2022 20:54:28 +0200
Subject: [PATCH 09/14] isModEnabled
---
htdocs/accountancy/admin/export.php | 2 +-
htdocs/accountancy/bookkeeping/list.php | 2 +-
htdocs/admin/commande.php | 2 +-
htdocs/expedition/class/expedition.class.php | 4 +--
htdocs/mrp/mo_production.php | 30 +++++++++----------
htdocs/product/card.php | 2 +-
.../inventory/class/inventory.class.php | 2 +-
htdocs/product/stock/massstockmove.php | 6 ++--
htdocs/product/stock/product.php | 2 +-
.../stocktransfer/stocktransfer_card.php | 6 ++--
htdocs/reception/card.php | 2 +-
11 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php
index e9310fab792..d0a0ab671d4 100644
--- a/htdocs/accountancy/admin/export.php
+++ b/htdocs/accountancy/admin/export.php
@@ -239,7 +239,7 @@ if (!$conf->use_javascript_ajax) {
} else {
print '';
$listmodelcsv = $accountancyexport->getType();
- print $form->selectarray("ACCOUNTING_EXPORT_MODELCSV", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+ print $form->selectarray("ACCOUNTING_EXPORT_MODELCSV", $listmodelcsv, getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV'), 0, 0, 0, '', 0, 0, 0, '', '', 1);
print ' ';
}
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 8dd004fcc35..4bc6d50de89 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -207,7 +207,7 @@ if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
$accountancyexport = new AccountancyExport($db);
$listofformat = $accountancyexport->getType();
-$formatexportset = $conf->global->ACCOUNTING_EXPORT_MODELCSV;
+$formatexportset = getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV');
if (empty($listofformat[$formatexportset])) {
$formatexportset = 1;
}
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index e7496c08db8..1369c5667a8 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -661,7 +661,7 @@ if ($conf->banque->enabled) {
}
// Ask for warehouse during order
-if ($conf->stock->enabled) {
+if (isModEnabled('stock')) {
print '';
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' ';
if (! empty($conf->use_javascript_ajax)) {
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index 5b033fc11f7..a3ce1738fac 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1244,7 +1244,7 @@ class Expedition extends CommonObject
$mouvS->origin = null;
// get lot/serial
$lotArray = null;
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
$lotArray = $shipmentlinebatch->fetchAll($obj->expeditiondet_id);
if (!is_array($lotArray)) {
$error++;
@@ -2781,7 +2781,7 @@ class ExpeditionLigne extends CommonObjectLine
$this->db->begin();
// delete batch expedition line
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch";
$sql .= " WHERE fk_expeditiondet = ".((int) $this->id);
diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 16249087403..f6aba7f2597 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -747,7 +747,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
print ' ';
- if ($conf->stock->enabled) {
+ if (isModEnabled('stock')) {
// Available
print '';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
@@ -756,7 +756,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
}
// Lot - serial
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Batch");
@@ -787,11 +787,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
print ' ';
print ' ';
- if ($conf->stock->enabled) {
+ if (isModEnabled('stock')) {
print ' ';
}
// Lot - serial
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print ' ';
}
// Action
@@ -909,7 +909,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
print ' ';
// Stock
- if ($conf->stock->enabled) {
+ if (isModEnabled('stock')) {
print '';
if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) {
print img_warning($langs->trans('StockTooLow')).' ';
@@ -918,7 +918,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
}
// Lot
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print ' ';
}
// Action delete line
@@ -965,12 +965,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
// Stock
- if ($conf->stock->enabled) {
+ if (isModEnabled('stock')) {
print ' ';
}
// Lot Batch
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($line2['batch'] != '') {
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
@@ -1033,12 +1033,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
// Stock
- if ($conf->stock->enabled) {
+ if (isModEnabled('stock')) {
print ' ';
}
// Lot / Batch
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($tmpproduct->status_batch) {
$preselected = (GETPOSTISSET('batch-'.$line->id.'-'.$i) ? GETPOST('batch-'.$line->id.'-'.$i) : '');
@@ -1121,7 +1121,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans("Warehouse");
}
print ' ';
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Batch");
@@ -1149,7 +1149,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
print ' ';
// Lot - serial
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print ' ';
}
// Action
@@ -1236,7 +1236,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
print ''; // Warehouse
print ' ';
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print ' '; // Lot
}
@@ -1277,7 +1277,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
print '';
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($line2['batch'] != '') {
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
@@ -1324,7 +1324,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''.$langs->trans("NoStockChangeOnServices").' ';
}
print ' ';
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($tmpproduct->status_batch) {
$preselected = (GETPOSTISSET('batchtoproduce-'.$line->id.'-'.$i) ? GETPOST('batchtoproduce-'.$line->id.'-'.$i) : '');
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index a1b450f7a0c..733d2202313 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1860,7 +1860,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ' ';
// Batch number managment
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
print ''.$langs->trans("ManageLotSerial").' ';
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial"));
diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php
index 80823c7ba5a..e0e2f9c59da 100644
--- a/htdocs/product/inventory/class/inventory.class.php
+++ b/htdocs/product/inventory/class/inventory.class.php
@@ -308,7 +308,7 @@ class Inventory extends CommonObject
$inventoryline->batch = $obj->batch;
$inventoryline->datec = dol_now();
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
$inventoryline->qty_stock = ($obj->batch ? $obj->qty : $obj->reel); // If there is batch detail, we take qty for batch, else global qty
} else {
$inventoryline->qty_stock = $obj->reel;
diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php
index e0e191fc5d1..85848942fbe 100644
--- a/htdocs/product/stock/massstockmove.php
+++ b/htdocs/product/stock/massstockmove.php
@@ -569,7 +569,7 @@ print ' ';
print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
-if ($conf->productbatch->enabled) {
+if (isModEnabled('productbatch')) {
print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
}
print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'center tagtd maxwidthonsmartphone ');
@@ -601,7 +601,7 @@ print img_picto($langs->trans("Product"), 'product', 'class="paddingright"');
print $form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1, '', null, 1);
print '';
// Batch number
-if ($conf->productbatch->enabled) {
+if (isModEnabled('productbatch')) {
print '';
print img_picto($langs->trans("LotSerial"), 'lot', 'class="paddingright"');
print ' ';
@@ -643,7 +643,7 @@ foreach ($listofdata as $key => $val) {
print ' ';
print $productstatic->getNomUrl(1).' - '.$productstatic->label;
print ' ';
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
print $val['batch'];
print ' ';
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 3054e6785bd..6af0e105b47 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -631,7 +631,7 @@ if ($id > 0 || $ref) {
print ' ';
}
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print ''.$langs->trans("ManageLotSerial").' ';
print $object->getLibStatut(0, 2);
print ' ';
diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php
index b88df4e1da1..b009ace7275 100644
--- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php
+++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php
@@ -749,7 +749,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
}
print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
@@ -789,7 +789,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action === 'editline' && $line->id == $lineid) $form->select_produits($line->fk_product, 'fk_product', $filtertype, $limit, 0, -1, 2, '', 0, array(), 0, 0, 0, 'minwidth200imp maxwidth300', 1);
else print $productstatic->getNomUrl(1).' - '.$productstatic->label;
print '';
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
if ($action === 'editline' && $line->id == $lineid) print ' ';
else {
@@ -883,7 +883,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$form->select_produits($fk_product, 'fk_product', $filtertype, $limit, 0, -1, 2, '', 0, array(), 0, 0, 0, 'minwidth200imp maxwidth300', 1);
print ' ';
// Batch number
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
print '';
print ' ';
print ' ';
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 9c0d3b01136..ed4586a7376 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -1244,7 +1244,7 @@ if ($action == 'create') {
if (!empty($extrafields)) {
//var_dump($line);
$colspan = 5;
- if ($conf->productbatch->enabled) {
+ if (isModEnabled('productbatch')) {
$colspan += 3;
}
$recLine = new CommandeFournisseurDispatch($db);
From 889856d55f81404365f8ee2995ee407ce3e78713 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?=
Date: Tue, 21 Jun 2022 23:39:31 +0200
Subject: [PATCH 10/14] use getDolGlobalString
---
htdocs/admin/bom.php | 2 +-
htdocs/admin/chequereceipts.php | 2 +-
htdocs/admin/contract.php | 2 +-
htdocs/admin/delivery.php | 2 +-
htdocs/admin/expedition.php | 8 ++++----
htdocs/admin/expensereport.php | 2 +-
htdocs/admin/facture.php | 2 +-
htdocs/admin/fichinter.php | 2 +-
htdocs/admin/holiday.php | 2 +-
htdocs/admin/mrp.php | 2 +-
htdocs/admin/propal.php | 2 +-
htdocs/admin/reception_setup.php | 2 +-
htdocs/admin/supplier_invoice.php | 2 +-
htdocs/admin/supplier_order.php | 2 +-
htdocs/admin/supplier_proposal.php | 2 +-
htdocs/core/modules/expedition/mod_expedition_ribera.php | 4 ++--
htdocs/takepos/admin/receipt.php | 4 ++--
17 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php
index daa3db54f0d..459d9c47227 100644
--- a/htdocs/admin/bom.php
+++ b/htdocs/admin/bom.php
@@ -456,7 +456,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print '';
diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php
index 3550697a8b0..396d44625a7 100644
--- a/htdocs/admin/chequereceipts.php
+++ b/htdocs/admin/chequereceipts.php
@@ -264,7 +264,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' ';
diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php
index 2f04222bb64..e8a1fc85790 100644
--- a/htdocs/admin/contract.php
+++ b/htdocs/admin/contract.php
@@ -448,7 +448,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' '."\n";
diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php
index 6b9653f119d..de26d237d01 100644
--- a/htdocs/admin/delivery.php
+++ b/htdocs/admin/delivery.php
@@ -437,7 +437,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print '';
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 60afa5a692e..c3881927d59 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -132,7 +132,7 @@ if ($action == 'updateMask') {
} elseif ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
- if ($conf->global->EXPEDITION_ADDON_PDF == "$value") {
+ if (getDolGlobalString('EXPEDITION_ADDON_PDF') == "$value") {
dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF', $conf->entity);
}
}
@@ -367,7 +367,7 @@ foreach ($dirmodels as $reldir) {
// Defaut
print ' ';
- if ($conf->global->EXPEDITION_ADDON_PDF == $name) {
+ if (getDolGlobalString('EXPEDITION_ADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
@@ -444,14 +444,14 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print " \n";
print '';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').' ';
-print ' ';
+print ' ';
print " \n";
print '';
diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php
index 9eb7767fc40..0c54eade6da 100644
--- a/htdocs/admin/expensereport.php
+++ b/htdocs/admin/expensereport.php
@@ -459,7 +459,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ''."\n";
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 6cf06a4198f..accb3d850a0 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -746,7 +746,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print '';
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index 88d9eda9b18..36a55be9a95 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -510,7 +510,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' ';
diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php
index adb8e616cad..f208e2a658a 100644
--- a/htdocs/admin/holiday.php
+++ b/htdocs/admin/holiday.php
@@ -541,7 +541,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' '."\n";
diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php
index aa905a0b030..f4283373b95 100644
--- a/htdocs/admin/mrp.php
+++ b/htdocs/admin/mrp.php
@@ -449,7 +449,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print '';
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index f5d7496a181..fe8db9818f7 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -678,7 +678,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' ';
diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php
index fcd0910ff49..1ca874c69b5 100644
--- a/htdocs/admin/reception_setup.php
+++ b/htdocs/admin/reception_setup.php
@@ -460,7 +460,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
else
{
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
+ $doleditor=new DolEditor($variablename, getDolGlobalString($variablename),'',80,'dolibarr_notes');
print $doleditor->Create();
}
print " \n";
diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php
index 9d94410d428..aa337ff1f29 100644
--- a/htdocs/admin/supplier_invoice.php
+++ b/htdocs/admin/supplier_invoice.php
@@ -460,7 +460,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print '';
diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php
index f0382d58838..9482a06be41 100644
--- a/htdocs/admin/supplier_order.php
+++ b/htdocs/admin/supplier_order.php
@@ -508,7 +508,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' ';
diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php
index cd2706a8a4f..bb0617c6700 100644
--- a/htdocs/admin/supplier_proposal.php
+++ b/htdocs/admin/supplier_proposal.php
@@ -477,7 +477,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print ' ';
diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php
index 736ddc3ab3f..0dfcd32d8f9 100644
--- a/htdocs/core/modules/expedition/mod_expedition_ribera.php
+++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php
@@ -80,7 +80,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
$tooltip .= $langs->trans("GenericMaskCodes5");
$texte .= ' '.$langs->trans("Mask").': ';
- $texte .= ''.$form->textwithpicto(' ', $tooltip, 1, 1).' ';
+ $texte .= ''.$form->textwithpicto(' ', $tooltip, 1, 1).' ';
$texte .= ' ';
$texte .= ' ';
$texte .= '';
@@ -125,7 +125,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $mask = $conf->global->EXPEDITION_RIBERA_MASK;
+ $mask = getDolGlobalString('EXPEDITION_RIBERA_MASK');
if (!$mask) {
$this->error = 'NotConfigured';
diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php
index 2d21046357c..bf5f5e8b931 100644
--- a/htdocs/takepos/admin/receipt.php
+++ b/htdocs/takepos/admin/receipt.php
@@ -195,7 +195,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print "\n";
@@ -208,7 +208,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
+ $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print "\n";
From 287f868fbb9b013480ec6899985159855c536b63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?=
Date: Wed, 22 Jun 2022 08:36:24 +0200
Subject: [PATCH 11/14] use getDolGlobalString
---
htdocs/adherents/type_translation.php | 4 ++--
htdocs/admin/ticket.php | 4 ++--
htdocs/admin/ticket_public.php | 6 +++---
htdocs/categories/card.php | 2 +-
htdocs/categories/traduction.php | 4 ++--
htdocs/comm/mailing/card.php | 4 ++--
htdocs/compta/bank/card.php | 2 +-
htdocs/core/class/html.formticket.class.php | 8 ++++----
htdocs/fichinter/card.php | 2 +-
htdocs/product/card.php | 4 ++--
htdocs/product/fournisseurs.php | 2 +-
htdocs/product/traduction.php | 8 ++++----
htdocs/projet/card.php | 2 +-
htdocs/user/note.php | 2 +-
14 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php
index 256f29b6b81..72976d4e65f 100644
--- a/htdocs/adherents/type_translation.php
+++ b/htdocs/adherents/type_translation.php
@@ -220,7 +220,7 @@ if ($action == 'edit') {
print '';
print ''.$langs->trans('Label').' ';
print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
print '';
@@ -283,7 +283,7 @@ if ($action == 'create' && $user->rights->adherent->configurer) {
print '';
print ''.$langs->trans('Label').' ';
print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php
index f902c3fb39b..99d1b34749f 100644
--- a/htdocs/admin/ticket.php
+++ b/htdocs/admin/ticket.php
@@ -642,7 +642,7 @@ $mail_intro = $conf->global->TICKET_MESSAGE_MAIL_INTRO ? $conf->global->TICKET_M
print ''.$langs->trans("TicketMessageMailIntroLabelAdmin");
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
-$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
+$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print '';
@@ -654,7 +654,7 @@ $mail_signature = $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE ? $conf->global->
print ' '.$langs->trans("TicketMessageMailSignatureLabelAdmin").'';
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
-$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
+$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print '';
diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php
index 1a4e3342cd0..0fd654b5d28 100644
--- a/htdocs/admin/ticket_public.php
+++ b/htdocs/admin/ticket_public.php
@@ -375,7 +375,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
print ' '.$langs->trans("TicketPublicInterfaceTextHomeLabelAdmin").'';
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
+ $doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print '';
@@ -387,7 +387,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
print ' '.$langs->trans("TicketPublicInterfaceTextHelpMessageLabelAdmin").'';
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
+ $doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print '';
@@ -434,7 +434,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
print '';
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('TICKET_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
+ $doleditor = new DolEditor('TICKET_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print ' ';
diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php
index ec3d75dee1a..361f2a5f1ce 100644
--- a/htdocs/categories/card.php
+++ b/htdocs/categories/card.php
@@ -246,7 +246,7 @@ if ($user->rights->categorie->creer) {
// Description
print ''.$langs->trans("Description").' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_5, '90%');
+ $doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_5, '90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index 2bbb4b5f0a8..512f25a67e2 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -263,7 +263,7 @@ if ($action == 'edit') {
// Desc
$desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : $object->multilangs[$key]['description']);
print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
@@ -323,7 +323,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print ''.$langs->trans('Label').' ';
print ' ';
print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index 15406da9211..d46a02132a1 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -753,7 +753,7 @@ if ($action == 'create') {
print '';
// wysiwyg editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('bodyemail', GETPOST('bodyemail', 'restricthtmlallowunvalid'), '', 600, 'dolibarr_mailings', '', true, true, $conf->global->FCKEDITOR_ENABLE_MAILING, 20, '90%');
+ $doleditor = new DolEditor('bodyemail', GETPOST('bodyemail', 'restricthtmlallowunvalid'), '', 600, 'dolibarr_mailings', '', true, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAILING'), 20, '90%');
$doleditor->Create();
print '
';
@@ -1273,7 +1273,7 @@ if ($action == 'create') {
if ($action == 'edit') {
// wysiwyg editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('bodyemail', $object->body, '', 600, 'dolibarr_mailings', '', true, true, $conf->global->FCKEDITOR_ENABLE_MAILING, 20, '90%');
+ $doleditor = new DolEditor('bodyemail', $object->body, '', 600, 'dolibarr_mailings', '', true, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAILING'), 20, '90%');
$doleditor->Create();
}
if ($action == 'edithtml') {
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index 31a918b1a27..29341b0fb99 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -986,7 +986,7 @@ if ($action == 'create') {
print '';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ?GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_4, '95%');
+ $doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ?GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_4, '95%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index d837cf06030..e13aaba4685 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -418,7 +418,7 @@ class FormTicket
}
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$uselocalbrowser = true;
- $doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET, ROWS_8, '90%');
+ $doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_TICKET'), ROWS_8, '90%');
$doleditor->Create();
print '';
@@ -1475,7 +1475,7 @@ class FormTicket
print '';
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('mail_intro', $mail_intro, '100%', 90, 'dolibarr_details', '', false, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
+ $doleditor = new DolEditor('mail_intro', $mail_intro, '100%', 90, 'dolibarr_details', '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_2, 70);
$doleditor->Create();
print ' ';
@@ -1512,7 +1512,7 @@ class FormTicket
//$toolbarname = 'dolibarr_details';
$toolbarname = 'dolibarr_notes';
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, 70);
+ $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, 70);
$doleditor->Create();
print '';
@@ -1524,7 +1524,7 @@ class FormTicket
print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelp"), 1, 'help');
print '';
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('mail_signature', $mail_signature, '100%', 150, 'dolibarr_details', '', false, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
+ $doleditor = new DolEditor('mail_signature', $mail_signature, '100%', 150, 'dolibarr_details', '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_2, 70);
$doleditor->Create();
print ' ';
}
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index fd07a30f648..e01f4a94876 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1433,7 +1433,7 @@ if ($action == 'create') {
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('np_desc', $objp->description, '', 164, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, ROWS_2, '90%');
+ $doleditor = new DolEditor('np_desc', $objp->description, '', 164, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'),, ROWS_2, '90%');
$doleditor->Create();
$objectline = new FichinterLigne($db);
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 733d2202313..457cf084587 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1964,7 +1964,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ''.$langs->trans("Description").' ';
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
- $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
+ $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%');
$doleditor->Create();
print " ";
@@ -2146,7 +2146,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) {
print ''.$langs->trans("NoteNotVisibleOnBill").' ';
- $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
+ $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%');
$doleditor->Create();
print " ";
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 96ce57c5bbe..59c534916be 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -806,7 +806,7 @@ END;
print ''.$langs->trans('ProductSupplierDescription').' ';
print '';
- $doleditor = new DolEditor('supplier_description', $object->desc_supplier, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
+ $doleditor = new DolEditor('supplier_description', $object->desc_supplier, '', 160, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index 65906a0cc0f..7f91e9c73a8 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -264,12 +264,12 @@ if ($action == 'edit') {
print '';
print ''.$langs->trans('Label').' ';
print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) {
print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").') ';
- $doleditor = new DolEditor("other-$key", $object->multilangs[$key]["other"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor("other-$key", $object->multilangs[$key]["other"], '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
}
print ' ';
@@ -335,13 +335,13 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print '';
print ''.$langs->trans('Label').' ';
print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
// Other field (not used)
if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) {
print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").' ';
- $doleditor = new DolEditor('other', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor = new DolEditor('other', '', '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
}
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 0cfe126d69b..2ad89326e6a 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -996,7 +996,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
// Description
print ''.$langs->trans("Description").' ';
print '';
- $doleditor = new DolEditor('description', $object->description, '', 90, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_3, '90%');
+ $doleditor = new DolEditor('description', $object->description, '', 90, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/user/note.php b/htdocs/user/note.php
index 1cf1f112df4..801cafbbd52 100644
--- a/htdocs/user/note.php
+++ b/htdocs/user/note.php
@@ -142,7 +142,7 @@ if ($id) {
print " id."\">";
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('note_private', $object->note_private, '', 280, 'dolibarr_notes', 'In', true, false, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_8, '90%');
+ $doleditor = new DolEditor('note_private', $object->note_private, '', 280, 'dolibarr_notes', 'In', true, false, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_8, '90%');
$doleditor->Create();
} else {
print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_private));
From f8f71dd5315a9289a65e9e6f23eaf585d18947ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?=
Date: Wed, 22 Jun 2022 13:16:45 +0200
Subject: [PATCH 12/14] use getDolGlobalString
---
htdocs/fichinter/card.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index e01f4a94876..d03cb11a7e0 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1433,7 +1433,7 @@ if ($action == 'create') {
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('np_desc', $objp->description, '', 164, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'),, ROWS_2, '90%');
+ $doleditor = new DolEditor('np_desc', $objp->description, '', 164, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), ROWS_2, '90%');
$doleditor->Create();
$objectline = new FichinterLigne($db);
From b7e539a90a799c3b6277b618bbef8ba7ef620937 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?=
Date: Wed, 22 Jun 2022 13:31:35 +0200
Subject: [PATCH 13/14] remove unused code
---
htdocs/holiday/document.php | 101 ++++++++++--------------------------
1 file changed, 28 insertions(+), 73 deletions(-)
diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php
index 25646e78046..a4b9bcfcfdb 100644
--- a/htdocs/holiday/document.php
+++ b/htdocs/holiday/document.php
@@ -6,7 +6,7 @@
* Copyright (C) 2005 Simon TOSSER
* Copyright (C) 2011-2012 Juanjo Menent
* Copyright (C) 2013 Cédric Salvador
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018-2022 Frédéric France
*
* 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
@@ -124,8 +124,6 @@ $title = $langs->trans("Leave").' - '.$langs->trans("Files");
llxHeader('', $title);
-$edit = false;
-
if ($object->id) {
$valideur = new User($db);
$valideur->fetch($object->fk_validator);
@@ -176,51 +174,25 @@ if ($object->id) {
$starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning';
$endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon';
- if (!$edit) {
- print '';
- print '';
- print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday"));
- print ' ';
- print ''.dol_print_date($object->date_debut, 'day');
- print ' ';
- print ''.$langs->trans($listhalfday[$starthalfday]).' ';
- print ' ';
- print ' ';
- } else {
- print '';
- print '';
- print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday"));
- print ' ';
- print '';
- print $form->selectDate($object->date_debut, 'date_debut_');
- print ' ';
- print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday') ?GETPOST('starthalfday') : $starthalfday));
- print ' ';
- print ' ';
- }
+ print '';
+ print '';
+ print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday"));
+ print ' ';
+ print ''.dol_print_date($object->date_debut, 'day');
+ print ' ';
+ print ''.$langs->trans($listhalfday[$starthalfday]).' ';
+ print ' ';
+ print ' ';
- if (!$edit) {
- print '';
- print '';
- print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday"));
- print ' ';
- print ''.dol_print_date($object->date_fin, 'day');
- print ' ';
- print ''.$langs->trans($listhalfday[$endhalfday]).' ';
- print ' ';
- print ' ';
- } else {
- print '';
- print '';
- print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday"));
- print ' ';
- print '';
- print $form->selectDate($object->date_fin, 'date_fin_');
- print ' ';
- print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday') ?GETPOST('endhalfday') : $endhalfday));
- print ' ';
- print ' ';
- }
+ print '';
+ print '';
+ print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday"));
+ print ' ';
+ print ''.dol_print_date($object->date_fin, 'day');
+ print ' ';
+ print ''.$langs->trans($listhalfday[$endhalfday]).' ';
+ print ' ';
+ print ' ';
// Nb days consumed
print '';
@@ -247,17 +219,10 @@ if ($object->id) {
}
// Description
- if (!$edit) {
- print ' ';
- print ''.$langs->trans('DescCP').' ';
- print ''.nl2br($object->description).' ';
- print ' ';
- } else {
- print '';
- print ''.$langs->trans('DescCP').' ';
- print ' ';
- print ' ';
- }
+ print '';
+ print ''.$langs->trans('DescCP').' ';
+ print ''.nl2br($object->description).' ';
+ print ' ';
print ''.$langs->trans("NbOfAttachedFiles").' '.count($filearray).' ';
print ''.$langs->trans("TotalSizeOfAttachedFiles").' '.dol_print_size($totalsize, 1, 1).' ';
@@ -274,8 +239,7 @@ if ($object->id) {
print ''."\n";
print '';
- if (! empty($object->fk_user_create))
- {
+ if (! empty($object->fk_user_create)) {
$userCreate=new User($db);
$userCreate->fetch($object->fk_user_create);
print '';
@@ -284,19 +248,10 @@ if ($object->id) {
print ' ';
}
- if (!$edit) {
- print '';
- print ''.$langs->trans('ReviewedByCP').' ';
- print ''.$valideur->getNomUrl(-1).' ';
- print ' ';
- } else {
- print '';
- print ''.$langs->trans('ReviewedByCP').' ';
- print '';
- print $form->select_dolusers($object->fk_user, "valideur", 1, ($user->admin ? '' : array($user->id))); // By default, hierarchical parent
- print ' ';
- print ' ';
- }
+ print '';
+ print ''.$langs->trans('ReviewedByCP').' ';
+ print ''.$valideur->getNomUrl(-1).' ';
+ print ' ';
print '';
print ''.$langs->trans('DateCreation').' ';
From 267e15011862e1c195a2442a22c2ffd35824d4b9 Mon Sep 17 00:00:00 2001
From: atm-steve <85500090+atm-steve@users.noreply.github.com>
Date: Wed, 22 Jun 2022 14:10:47 +0200
Subject: [PATCH 14/14] Update objectline_create.tpl.php
---
htdocs/core/tpl/objectline_create.tpl.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index 37cc7f94ce8..d88c416f29e 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -348,7 +348,7 @@ if ($nolinesbefore) {
if (!empty($conf->service->enabled) && ($object->element == 'facturerec' || $object->element == 'invoice_supplier_rec')) {
echo ' ';
echo $langs->trans('AutoFillDateFrom').' ';
- if ($conf->global->INVOICE_REC_DATE_TO_YES) {
+ if (!empty($conf->global->INVOICE_REC_DATE_TO_YES)) {
$line->date_start_fill = 1;
$line->date_end_fill = 1;
}