From 75f579c3ad88a9eea3529bbd5808545ec908321b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 22 Oct 2021 00:59:09 +0200 Subject: [PATCH 01/26] New table element_tag --- .../mysql/tables/llx_element_tag.key.sql | 23 ++++++++++++++++++ .../install/mysql/tables/llx_element_tag.sql | 24 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_element_tag.key.sql create mode 100644 htdocs/install/mysql/tables/llx_element_tag.sql diff --git a/htdocs/install/mysql/tables/llx_element_tag.key.sql b/htdocs/install/mysql/tables/llx_element_tag.key.sql new file mode 100644 index 00000000000..fc1e3e7861d --- /dev/null +++ b/htdocs/install/mysql/tables/llx_element_tag.key.sql @@ -0,0 +1,23 @@ +-- ============================================================================ +-- Copyright (C) 2021 Maxime Kohlhaas +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + +ALTER TABLE llx_element_tag ADD PRIMARY KEY pk_element_tag (fk_categorie, fk_socpeople); +ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_categorie (fk_categorie); +ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_socpeople (fk_socpeople); + +ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); diff --git a/htdocs/install/mysql/tables/llx_element_tag.sql b/htdocs/install/mysql/tables/llx_element_tag.sql new file mode 100644 index 00000000000..937137727e7 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_element_tag.sql @@ -0,0 +1,24 @@ +-- ============================================================================ +-- Copyright (C) 2021 Maxime Kohlhaas +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + +create table llx_element_tag +( + fk_categorie integer NOT NULL, + fk_element integer NOT NULL, + import_key varchar(14) +)ENGINE=innodb; From 8db7989aa711d41acf2bd9b2b6168ed03256ea9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 24 Oct 2021 14:18:43 +0200 Subject: [PATCH 02/26] fix warnings in commande list --- htdocs/commande/list.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 503c125b59c..b0685b8b64b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1345,10 +1345,25 @@ if ($resql) { print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder); } + $totalarray = array( + 'nbfield' => 0, + 'val' => array( + 'c.total_ht' => 0, + 'c.total_tva' => 0, + 'c.total_ttc' => 0, + ), + 'pos' => array(), + ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields - $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); + $parameters = array( + 'arrayfields' => $arrayfields, + 'param' => $param, + 'sortfield' => $sortfield, + 'sortorder' => $sortorder, + 'totalarray' => &$totalarray, + ); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['c.datec']['checked'])) { @@ -1388,7 +1403,6 @@ if ($resql) { $generic_product = new Product($db); $userstatic = new User($db); $i = 0; - $totalarray = array('nbfield' => 0, 'val' => array(), 'pos' => array()); while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); From d4107fcc4e324267ed872f7f4da07c123c01ba80 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 31 Oct 2021 16:14:13 +0100 Subject: [PATCH 03/26] Fix wrong column name --- htdocs/install/mysql/tables/llx_element_tag.key.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_element_tag.key.sql b/htdocs/install/mysql/tables/llx_element_tag.key.sql index fc1e3e7861d..e4af1c3871e 100644 --- a/htdocs/install/mysql/tables/llx_element_tag.key.sql +++ b/htdocs/install/mysql/tables/llx_element_tag.key.sql @@ -16,8 +16,8 @@ -- -- ============================================================================ -ALTER TABLE llx_element_tag ADD PRIMARY KEY pk_element_tag (fk_categorie, fk_socpeople); +ALTER TABLE llx_element_tag ADD PRIMARY KEY pk_element_tag (fk_categorie, fk_element); ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_categorie (fk_categorie); -ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_socpeople (fk_socpeople); +ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_element (fk_element); ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); From cb8e1ce8f034903e5d3c5010abc326f776eb16a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 09:20:22 +0100 Subject: [PATCH 04/26] fix warning --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 6fd84f4eda3..dff83eb508c 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -110,7 +110,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { } // Validation of fields values - if ($conf->global->MAIN_FEATURE_LEVEL >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) { + if (getDolGlobalInt('MAIN_FEATURE_LEVEL') >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) { if (!$error && !empty($val['validate']) && is_callable(array($object, 'validateField'))) { if (!$object->validateField($object->fields, $key, $value)) { $error++; From aaadeb1b9db153e2664f9030efbbb1a737995325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 09:27:32 +0100 Subject: [PATCH 05/26] fix change sql --- htdocs/hrm/class/skilldet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index 1fb90b907db..c3acdd0982e 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -104,7 +104,7 @@ class Skilldet extends CommonObject */ public $fields=array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), - 'rank' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>2, 'notnull'=>0, 'visible'=>2,), + 'rankorder' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>2, 'notnull'=>0, 'visible'=>2,), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,), 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>0,), From f99a11b876324d5b87c0bd1401f470d4d62fc380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 09:28:51 +0100 Subject: [PATCH 06/26] Update evaluationdet.class.php --- htdocs/hrm/class/evaluationdet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index a268f1b30be..115571bb6ba 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -111,7 +111,7 @@ class Evaluationline extends CommonObject 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), 'fk_skill' => array('type'=>'integer:Skill:hrm/class/skill.class.php:1', 'label'=>'Skill', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,), 'fk_evaluation' => array('type'=>'integer:Evaluation:hrm/class/evaluation.class.php:1', 'label'=>'Evaluation', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,), - 'rank' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1,), + 'rankorder' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1,), 'required_rank' => array('type'=>'integer', 'label'=>'requiredRank', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>1,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), ); From b992deb08444b8a620af8773e6a2c741e119964e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 09:44:43 +0100 Subject: [PATCH 07/26] fix warnings --- htdocs/core/modules/printing/printipp.modules.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index f290b2b4e90..02ba610961d 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -1,6 +1,6 @@ + * Copyright (C) 2014-2021 Frederic 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 @@ -108,10 +108,10 @@ class printing_printipp extends PrintingDriver global $conf; $this->db = $db; - $this->host = $conf->global->PRINTIPP_HOST; - $this->port = $conf->global->PRINTIPP_PORT; - $this->user = $conf->global->PRINTIPP_USER; - $this->password = $conf->global->PRINTIPP_PASSWORD; + $this->host = getDolGlobalString('PRINTIPP_HOST'); + $this->port = getDolGlobalString('PRINTIPP_PORT'); + $this->user = getDolGlobalString('PRINTIPP_USER'); + $this->password = getDolGlobalString('PRINTIPP_PASSWORD'); $this->conf[] = array('varname'=>'PRINTIPP_HOST', 'required'=>1, 'example'=>'localhost', 'type'=>'text'); $this->conf[] = array('varname'=>'PRINTIPP_PORT', 'required'=>1, 'example'=>'631', 'type'=>'text'); $this->conf[] = array('varname'=>'PRINTIPP_USER', 'required'=>0, 'example'=>'', 'type'=>'text', 'moreattributes'=>'autocomplete="off"'); @@ -159,8 +159,8 @@ class printing_printipp extends PrintingDriver $ipp->setCopies($obj->copy); } else { if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) { - dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".$conf->global->PRINTIPP_URI_DEFAULT); - $ipp->setPrinterURI($conf->global->PRINTIPP_URI_DEFAULT); + dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".getDolGlobalString('PRINTIPP_URI_DEFAULT')); + $ipp->setPrinterURI(getDolGlobalString('PRINTIPP_URI_DEFAULT')); } else { $this->errors[] = 'NoDefaultPrinterDefined'; $error++; From 3508aa92d6bcc20d6f7e2d5fefe15cef6ceaacd4 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 1 Nov 2021 10:24:19 +0100 Subject: [PATCH 08/26] Fix : uk and index on element_tag table --- htdocs/install/mysql/tables/llx_element_tag.key.sql | 4 +--- htdocs/install/mysql/tables/llx_element_tag.sql | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_element_tag.key.sql b/htdocs/install/mysql/tables/llx_element_tag.key.sql index e4af1c3871e..d3a0b38afa9 100644 --- a/htdocs/install/mysql/tables/llx_element_tag.key.sql +++ b/htdocs/install/mysql/tables/llx_element_tag.key.sql @@ -16,8 +16,6 @@ -- -- ============================================================================ -ALTER TABLE llx_element_tag ADD PRIMARY KEY pk_element_tag (fk_categorie, fk_element); -ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_categorie (fk_categorie); -ALTER TABLE llx_element_tag ADD INDEX idx_element_tag_fk_element (fk_element); +ALTER TABLE llx_element_tag ADD UNIQUE INDEX idx_element_tag_uk (fk_categorie, fk_element); ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); diff --git a/htdocs/install/mysql/tables/llx_element_tag.sql b/htdocs/install/mysql/tables/llx_element_tag.sql index 937137727e7..d43ced98130 100644 --- a/htdocs/install/mysql/tables/llx_element_tag.sql +++ b/htdocs/install/mysql/tables/llx_element_tag.sql @@ -18,6 +18,7 @@ create table llx_element_tag ( + rowid integer AUTO_INCREMENT PRIMARY KEY, fk_categorie integer NOT NULL, fk_element integer NOT NULL, import_key varchar(14) From 55243dedb69c29a0ac3b54db9a1739d021b192f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 13:32:19 +0100 Subject: [PATCH 09/26] fix typo --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index dff83eb508c..fd13c61efd2 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -110,7 +110,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { } // Validation of fields values - if (getDolGlobalInt('MAIN_FEATURE_LEVEL') >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) { if (!$error && !empty($val['validate']) && is_callable(array($object, 'validateField'))) { if (!$object->validateField($object->fields, $key, $value)) { $error++; From 18918d4e9d26be41029b5680c9fc831ca99dc4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 13:34:13 +0100 Subject: [PATCH 10/26] Update actions_addupdatedelete.inc.php --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index fd13c61efd2..10d25b2aa09 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -226,7 +226,7 @@ if ($action == 'update' && !empty($permissiontoadd)) { } // Validation of fields values - if ($conf->global->MAIN_FEATURE_LEVEL >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) { if (!$error && !empty($val['validate']) && is_callable(array($object, 'validateField'))) { if (!$object->validateField($object->fields, $key, $value)) { $error++; From d7c0d87aeb0eb5cab544c97856c4127df5239912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 13:35:25 +0100 Subject: [PATCH 11/26] Update mod_facture_fournisseur_tulip.php --- .../modules/supplier_invoice/mod_facture_fournisseur_tulip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 5fc2737957f..e6838b9c4c4 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -104,7 +104,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; - if ($conf->global->MAIN_FEATURE_LEVEL >= 2) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // Parametrage du prefix des replacement $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; From 8bfb6562284d6c3cd4eb151af82d03ff4f3dd468 Mon Sep 17 00:00:00 2001 From: javieralapps4up Date: Mon, 1 Nov 2021 13:47:52 +0100 Subject: [PATCH 12/26] Update card.php Load $usergroup->members is not necessary and wastes resources --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 429de7fd1a6..8a211501382 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1945,7 +1945,7 @@ if ($action == 'create' || $action == 'adduserldap') { $exclude = array(); $usergroup = new UserGroup($db); - $groupslist = $usergroup->listGroupsForUser($object->id); + $groupslist = $usergroup->listGroupsForUser($object->id, false); if (!empty($groupslist)) { foreach ($groupslist as $groupforuser) { From d40e9bb3046b30ec3e47a9844ec838e905514873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Nov 2021 13:52:06 +0100 Subject: [PATCH 13/26] remove old field field skype has been removed --- htdocs/adherents/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index fe21b8577ef..4936fadd326 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -314,7 +314,7 @@ if (!empty($search_categ) || !empty($catid)) { } $sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,"; $sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,"; -$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,"; +$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,"; $sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,"; $sql .= " d.note_private, d.note_public,"; $sql .= " s.nom,"; From 98929f2dbac85245debf9f05670f3ba5947dbfea Mon Sep 17 00:00:00 2001 From: BadPixxel Date: Tue, 2 Nov 2021 14:16:55 +0100 Subject: [PATCH 14/26] FIX: Status propagation from Parent Product toSell or toBuy Status propagation should be done only when parent is updated. Otherwise, any modification made on the parent will overwrite the specific configuration made at the child level. --- htdocs/variants/class/ProductCombination.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index b7fc3d620f5..4245f2039c9 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -488,8 +488,14 @@ class ProductCombination $child->price_autogen = $parent->price_autogen; $child->weight = $parent->weight; - $child->status = $parent->status; - + // Only when Parent Status are updated + if ($parent->oldcopy && ($parent->status != $parent->oldcopy->status)) { + $child->status = $parent->status; + } + if ($parent->oldcopy && ($parent->status_buy != $parent->oldcopy->status_buy)) { + $child->status_buy = $parent->status_buy; + } + if ($this->variation_weight) { // If we must add a delta on weight $child->weight = ($child->weight ? $child->weight : 0) + $this->variation_weight; } From 5c10cd5ba9df55220a1f218da5333ec444e01b61 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 2 Nov 2021 13:20:41 +0000 Subject: [PATCH 15/26] Fixing style errors. --- htdocs/variants/class/ProductCombination.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 4245f2039c9..e1fab396cb8 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -490,12 +490,12 @@ class ProductCombination $child->weight = $parent->weight; // Only when Parent Status are updated if ($parent->oldcopy && ($parent->status != $parent->oldcopy->status)) { - $child->status = $parent->status; - } + $child->status = $parent->status; + } if ($parent->oldcopy && ($parent->status_buy != $parent->oldcopy->status_buy)) { - $child->status_buy = $parent->status_buy; - } - + $child->status_buy = $parent->status_buy; + } + if ($this->variation_weight) { // If we must add a delta on weight $child->weight = ($child->weight ? $child->weight : 0) + $this->variation_weight; } From d91c24233c33525d89ec4c0557fc74770464cd8e Mon Sep 17 00:00:00 2001 From: kamel Date: Tue, 2 Nov 2021 16:43:09 +0100 Subject: [PATCH 16/26] NEW: Can show Paid button if invoice or supplier invoice has no payments with global INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS and SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS --- htdocs/compta/facture/card.php | 13 ++++++++----- htdocs/fourn/facture/card.php | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ba505f33d67..b02c48ff79b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4091,10 +4091,10 @@ if ($action == 'create') { } // Confirmation du classement paye - if ($action == 'paid' && $resteapayer <= 0) { + if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $resteapayer == $object->total_ttc))) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } - if ($action == 'paid' && $resteapayer > 0) { + if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $resteapayer != $object->total_ttc)) { $close = array(); // Code $i = 0; @@ -5450,14 +5450,17 @@ if ($action == 'create') { } // Classify paid - if (($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0))) - || ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id)) + if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercanissuepayment && ( + ($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) || + ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0) || + ($object->type == Facture::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) + ) ) { print ''.$langs->trans('ClassifyPaid').''; } // Classify 'closed not completely paid' (possible if validated and not yet filed paid) - if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && $usercanissuepayment) { + if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $resteapayer != $object->total_ttc) && $usercanissuepayment) { if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index ee1f768b60b..507c046a6a4 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2563,11 +2563,11 @@ if ($action == 'create') { } // Confirmation set paid - if ($action == 'paid' && $resteapayer <= 0) { + if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $resteapayer == $object->total_ttc))) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } - if ($action == 'paid' && $resteapayer > 0) { + if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $resteapayer != $object->total_ttc)) { $close = array(); // Code $i = 0; @@ -3496,14 +3496,17 @@ if ($action == 'create') { } // Classify paid - if (($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && (($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0))) - || ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && empty($discount->id)) + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && ( + ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) || + ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0) || + ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) + ) ) { print ''.$langs->trans('ClassifyPaid').''; } // Classify 'closed not completely paid' (possible if validated and not yet filed paid) - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0) { + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $object->total_ttc != $resteapayer)) { if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; From a359c7a681dfa27c3d57969ea02cdabd13e4b259 Mon Sep 17 00:00:00 2001 From: Vincent Dieltiens Date: Wed, 3 Nov 2021 14:22:08 +0100 Subject: [PATCH 17/26] Handle case where credit note has no source invoice --- htdocs/fourn/facture/card.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 htdocs/fourn/facture/card.php diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php old mode 100644 new mode 100755 index ee1f768b60b..5de5942a542 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2721,8 +2721,12 @@ if ($action == 'create') { } if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { $facusing = new FactureFournisseur($db); - $facusing->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; + if ($object->fk_facture_source > 0) { + $facusing->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; + } else { + print ' ('.$langs->transnoentities("NoInvoiceToCorrect").')'; + } } $facidavoir = $object->getListIdAvoirFromInvoice(); From a4c4732d5d10588dd6877360a6db1e51be046d33 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 3 Nov 2021 16:18:03 +0100 Subject: [PATCH 18/26] NEW: for developpers add hook for moreHTMLRef in dol_banner_tab --- htdocs/core/class/hookmanager.class.php | 3 ++- htdocs/core/lib/functions.lib.php | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 40610ce5d6f..691c20e10f8 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -229,7 +229,8 @@ class HookManager 'showLinkToObjectBlock', 'setContentSecurityPolicy', 'setHtmlTitle', - 'completeTabsHead' + 'completeTabsHead', + 'formDolBanner' ) )) { $hooktype = 'addreplace'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 408a771e1ed..8912c41152a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1845,7 +1845,7 @@ function dol_get_fiche_end($notab = 0) */ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '') { - global $conf, $form, $user, $langs; + global $conf, $form, $user, $langs, $hookmanager; $error = 0; @@ -2116,6 +2116,17 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $morehtmlref .= ''; } + $parameters=array('morehtmlref'=>$morehtmlref); + $reshook = $hookmanager->executeHooks('formDolBanner', $parameters, $object, ''); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } elseif (empty($reshook)) { + $morehtmlref .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $morehtmlref = $hookmanager->resPrint; + } + + print '
'; print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright); print '
'; From 054d98b942299ab8cb8d238c66047e5009cd6831 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 3 Nov 2021 16:31:35 +0100 Subject: [PATCH 19/26] fix ref --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8912c41152a..c71b3ad0802 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2117,7 +2117,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi } $parameters=array('morehtmlref'=>$morehtmlref); - $reshook = $hookmanager->executeHooks('formDolBanner', $parameters, $object, ''); + $reshook = $hookmanager->executeHooks('formDolBanner', $parameters, $object, $action); if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { From 3f426abc290f6198d836fed5a357982b177c7034 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 4 Nov 2021 10:56:55 +0100 Subject: [PATCH 20/26] Qual: If hidden option BANK_CAN_RECONCILIATE_CASHACCOUNT is activated, show Account Statements tab on Cash Accounts --- htdocs/core/lib/bank.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 30a3d21de90..554d435c471 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -4,6 +4,7 @@ * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2021 Ferran Marcet * * 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 @@ -66,7 +67,7 @@ function bank_prepare_head(Account $object) $head[$h][2] = 'graph'; $h++; - if ($object->courant != Account::TYPE_CASH) { + if ($object->courant != Account::TYPE_CASH || !empty($conf->global->BANK_CAN_RECONCILIATE_CASHACCOUNT)) { $nbReceipts = 0; // List of all standing receipts From 58ae45a88bd29fb66eeeb24f5d95b54e92cd2ffa Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Thu, 4 Nov 2021 13:57:47 +0100 Subject: [PATCH 21/26] fix DocumentPreview on holiday documents --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/holiday/document.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index ffa441c0527..6f0a79d9383 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1373,7 +1373,7 @@ class FormFile } // Preview link if (!$editline) { - print $this->showPreview($file, $modulepart, $filepath, 0, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); + print $this->showPreview($file, $modulepart, $filepath, 0, 'entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); } print "\n"; diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 6986d75d630..b11b795723c 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -349,7 +349,7 @@ if ($object->id) { $permissiontoadd = $user->rights->holiday->write; $permtoedit = $user->rights->holiday->write; $param = '&id='.$object->id; - $relativepathwithnofile = $modulepart.'/'.dol_sanitizeFileName($object->ref).'/'; + $relativepathwithnofile = dol_sanitizeFileName($object->ref).'/'; $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__'; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; From 4af8a4e9fd8c84a8c3443c8066db1cfc28cdc275 Mon Sep 17 00:00:00 2001 From: Vincent Dieltiens Date: Fri, 5 Nov 2021 12:10:28 +0100 Subject: [PATCH 22/26] Add EXPENSEREPORT_FILE_IS_REQUIRED global var to force user to join a file for each line of an expense report --- htdocs/expensereport/card.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index b711a65d25a..f15f8c74743 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -118,6 +118,7 @@ $permissiontoadd = $user->rights->expensereport->creer; // Used by the include o $upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref); $projectRequired = $conf->projet->enabled && ! empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED); +$fileRequired = !empty($conf->global->EXPENSEREPORT_FILE_IS_REQUIRED); if ($object->id > 0) { // Check current user can read this expense report @@ -1157,6 +1158,12 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Project")), null, 'errors'); } + // If no file associated + if ($fileRequired && $fk_ecm_files == 0) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); + } + if (!$error) { $type = 0; // TODO What if service ? We should take the type product/service from the type of expense report llx_c_type_fees From 02200b98103803826a1b6737bd6bc355ce77b8e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Nov 2021 13:10:44 +0100 Subject: [PATCH 23/26] Update card.php --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5de5942a542..c986bdd56db 100755 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2725,7 +2725,7 @@ if ($action == 'create') { $facusing->fetch($object->fk_facture_source); print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; } else { - print ' ('.$langs->transnoentities("NoInvoiceToCorrect").')'; + print ' ('.$langs->transnoentities("CorrectInvoiceNotFound").')'; } } From bc7b035846a33b21000614751b33c413408bd646 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Nov 2021 13:11:54 +0100 Subject: [PATCH 24/26] Update card.php --- htdocs/fourn/facture/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c986bdd56db..da8672c9518 100755 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1,4 +1,4 @@ - * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles @@ -2725,7 +2725,7 @@ if ($action == 'create') { $facusing->fetch($object->fk_facture_source); print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; } else { - print ' ('.$langs->transnoentities("CorrectInvoiceNotFound").')'; + print ' ('.$langs->transnoentities("CorrectedInvoiceNotFound").')'; } } From 2b6d296e63a0d3e7f80cb41416129c9da646154e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Nov 2021 13:58:11 +0100 Subject: [PATCH 25/26] Rename var --- htdocs/compta/facture/card.php | 10 +++++----- htdocs/fourn/facture/card.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index b02c48ff79b..509ab85634d 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4091,10 +4091,10 @@ if ($action == 'create') { } // Confirmation du classement paye - if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $resteapayer == $object->total_ttc))) { + if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $resteapayer == $object->total_ttc))) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } - if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $resteapayer != $object->total_ttc)) { + if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc)) { $close = array(); // Code $i = 0; @@ -5451,16 +5451,16 @@ if ($action == 'create') { // Classify paid if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercanissuepayment && ( - ($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) || + ($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0) || - ($object->type == Facture::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) + ($object->type == Facture::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) ) ) { print ''.$langs->trans('ClassifyPaid').''; } // Classify 'closed not completely paid' (possible if validated and not yet filed paid) - if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $resteapayer != $object->total_ttc) && $usercanissuepayment) { + if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc) && $usercanissuepayment) { if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d5e27b62d4b..a6cf0cb232d 100755 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2563,11 +2563,11 @@ if ($action == 'create') { } // Confirmation set paid - if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $resteapayer == $object->total_ttc))) { + if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $resteapayer == $object->total_ttc))) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } - if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $resteapayer != $object->total_ttc)) { + if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc)) { $close = array(); // Code $i = 0; @@ -3501,16 +3501,16 @@ if ($action == 'create') { // Classify paid if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && ( - ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) || + ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0) || - ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) && $object->total_ttc == $resteapayer))) + ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) ) ) { print ''.$langs->trans('ClassifyPaid').''; } // Classify 'closed not completely paid' (possible if validated and not yet filed paid) - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_FORCE_PAID_WHEN_NO_PAIEMENTS) || $object->total_ttc != $resteapayer)) { + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $object->total_ttc != $resteapayer)) { if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; From 897b00faf02fb5e803f33f7c0f9196b8701fcfda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Nov 2021 14:23:19 +0100 Subject: [PATCH 26/26] Clean code --- htdocs/admin/bank.php | 6 ++---- htdocs/admin/modules.php | 2 +- htdocs/admin/prelevement.php | 2 +- htdocs/admin/syslog.php | 4 +--- htdocs/admin/translation.php | 2 +- htdocs/comm/propal/card.php | 2 +- htdocs/core/class/html.formadmin.class.php | 2 +- htdocs/core/class/infobox.class.php | 2 +- htdocs/core/class/translate.class.php | 2 +- htdocs/core/get_info.php | 4 ++-- htdocs/core/lib/functions.lib.php | 4 ++-- htdocs/core/lib/project.lib.php | 10 +--------- htdocs/exports/export.php | 1 - htdocs/main.inc.php | 14 ++++---------- htdocs/societe/admin/societe.php | 2 +- htdocs/societe/paymentmodes.php | 2 +- htdocs/stripe/admin/stripe.php | 11 +---------- htdocs/theme/eldy/main_menu_fa_icons.inc.php | 2 +- 18 files changed, 23 insertions(+), 51 deletions(-) diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 6580db4e8f3..e1e468b0cec 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -275,8 +275,7 @@ print '

'; /* * Document templates generators */ -//if (! empty($conf->global->MAIN_FEATURES_LEVEL)) -//{ + print load_fiche_titre($langs->trans("BankAccountModelModule"), '', ''); // Load array def with activated templates @@ -466,8 +465,7 @@ print '

'; /* * Document templates generators */ -//if (! empty($conf->global->MAIN_FEATURES_LEVEL)) -//{ + print load_fiche_titre($langs->trans("Other"), '', ''); print "\n"; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 9c2b91ec586..2cbb14bb2dd 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -542,7 +542,7 @@ if ($mode == 'common' || $mode == 'commonkanban') { $moreforfilter .= '
'; $moreforfilter .= $form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), $langs->trans('Origin'), 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1); $moreforfilter .= '
'; - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { $array_version = array('stable'=>$langs->transnoentitiesnoconv("Stable")); if ($conf->global->MAIN_FEATURES_LEVEL < 0) { $array_version['deprecated'] = $langs->trans("Deprecated"); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 207642fe8e3..88a02e90457 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -297,7 +297,7 @@ foreach ($dirmodels as $reldir) $module = new $classname($db); $modulequalified=1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; if ($modulequalified) { diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 10b3d1bd47b..2f272cd986f 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -187,8 +187,6 @@ if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && $user->entity) { } -//print "conf->global->MAIN_FEATURES_LEVEL = ".$conf->global->MAIN_FEATURES_LEVEL."

\n"; - // Output mode print load_fiche_titre($langs->trans("SyslogOutput"), '', ''); @@ -207,7 +205,7 @@ foreach ($syslogModules as $moduleName) { $moduleactive = (int) $module->isActive(); //print $moduleName." = ".$moduleactive." - ".$module->getName()." ".($moduleactive == -1)."
\n"; - if (($moduleactive == -1) && empty($conf->global->MAIN_FEATURES_LEVEL)) { + if (($moduleactive == -1) && getDolGlobalInt('MAIN_FEATURES_LEVEL') == 0) { continue; // Some modules are hidden if not activable and not into debug mode (end user must not see them) } diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index f07623ed5d0..e9a6eaeb390 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -556,7 +556,7 @@ if ($mode == 'searchkey') { print ''.img_edit_add($langs->trans("TranslationOverwriteKey")).''; } - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { $transifexlangfile = '$'; // $ means 'All' //$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key; $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index c046281f18e..896448d7b9a 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2679,7 +2679,7 @@ if ($action == 'create') { $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList); // Show online signature link - $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok + $useonlinesignature = 1; // Replace this with 1 when feature to make online signature is ok if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) { print '
'; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 13619fe5aa3..4196fb32b68 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -304,7 +304,7 @@ class FormAdmin if (preg_match('/\.lib/i', $filelib)) { continue; } - if (empty($conf->global->MAIN_FEATURES_LEVEL) && in_array($file, $expdevmenu)) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 0 && in_array($file, $expdevmenu)) { continue; } diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index adde51c4974..0cd34e13193 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -37,7 +37,7 @@ class InfoBox { global $conf; - if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { return array( 0 => 'Home', 1 => 'UsersHome', diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index b535d2b3585..e741adc84b5 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -589,7 +589,7 @@ class Translate } /* Disabled. There is too many cases where translation of $newstr is not defined is normal (like when output with setEventMessage an already translated string) - if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { dol_syslog(__METHOD__." MAIN_FEATURES_LEVEL=DEVELOP: missing translation for key '".$newstr."' in ".$_SERVER["PHP_SELF"], LOG_DEBUG); }*/ diff --git a/htdocs/core/get_info.php b/htdocs/core/get_info.php index 4927be6a005..ee21aac0de3 100644 --- a/htdocs/core/get_info.php +++ b/htdocs/core/get_info.php @@ -83,8 +83,8 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli .= " ".DOL_VERSION; } -if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { - $appli .= "
".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; +if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { + $appli .= "
".$langs->trans("LevelOfFeature").': '.getDolGlobalInt('MAIN_FEATURES_LEVEL'); } $logouttext = ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c71b3ad0802..25dec3e47bb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4537,7 +4537,7 @@ function dol_print_error($db = '', $error = '', $errors = null) if ($_SERVER['DOCUMENT_ROOT']) { // Mode web $out .= $langs->trans("DolibarrHasDetectedError").".
\n"; - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') > 0) { $out .= "You use an experimental or develop level of features, so please do NOT report any bugs or vulnerability, except if problem is confirmed after moving option MAIN_FEATURES_LEVEL back to 0.
\n"; } $out .= $langs->trans("InformationToHelpDiagnose").":
\n"; @@ -4545,7 +4545,7 @@ function dol_print_error($db = '', $error = '', $errors = null) $out .= "".$langs->trans("Date").": ".dol_print_date(time(), 'dayhourlog')."
\n"; $out .= "".$langs->trans("Dolibarr").": ".DOL_VERSION." - https://www.dolibarr.org
\n"; if (isset($conf->global->MAIN_FEATURES_LEVEL)) { - $out .= "".$langs->trans("LevelOfFeature").": ".dol_htmlentities($conf->global->MAIN_FEATURES_LEVEL, ENT_COMPAT)."
\n"; + $out .= "".$langs->trans("LevelOfFeature").": ".getDolGlobalInt('MAIN_FEATURES_LEVEL')."
\n"; } if (function_exists("phpversion")) { $out .= "".$langs->trans("PHP").": ".phpversion()."
\n"; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index c66bcdfc2d8..e9e06708f7c 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -471,14 +471,6 @@ function project_timesheet_prepare_head($mode, $fuser = null) $h++; } - /*if ($conf->global->MAIN_FEATURES_LEVEL >= 2) - { - $head[$h][0] = DOL_URL_ROOT."/projet/activity/perline.php".($param?'?'.$param:''); - $head[$h][1] = $langs->trans("InputDetail"); - $head[$h][2] = 'inputperline'; - $h++; - }*/ - complete_head_from_modules($conf, $langs, null, $head, $h, 'project_timesheet'); complete_head_from_modules($conf, $langs, null, $head, $h, 'project_timesheet', 'remove'); @@ -517,7 +509,7 @@ function project_admin_prepare_head() $head[$h][2] = 'attributes_task'; $h++; - if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $langs->load("members"); $head[$h][0] = DOL_URL_ROOT.'/projet/admin/website.php'; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index c0a48b97222..93e20b06afe 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -151,7 +151,6 @@ $sqlusedforexport = ''; $head = array(); $upload_dir = $conf->export->dir_temp.'/'.$user->id; -//$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1); $usefilters = 1; // Security check diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c1f3231c737..25bc42046a9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -523,7 +523,6 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (invalid token), so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING); //print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers. setEventMessages('SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry', null, 'warnings'); - //if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."
\n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings'); if (isset($_POST['id'])) $savid = ((int) $_POST['id']); unset($_POST); //unset($_POST['action']); unset($_POST['massaction']); @@ -1437,8 +1436,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Do not index print ''."\n"; // Scale for mobile device print ''."\n"; - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { - print ''."\n"; + if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { + print ''."\n"; } // Favicon $favicon = DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; @@ -1628,11 +1627,6 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } else { print ''."\n"; } - /*if (! empty($conf->global->MAIN_FEATURES_LEVEL) && ! defined('JS_JQUERY_MIGRATE_DISABLED')) - { - if (defined('JS_JQUERY_MIGRATE') && constant('JS_JQUERY_MIGRATE')) print ''."\n"; - else print ''."\n"; - }*/ if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) { print ''."\n"; } else { @@ -1842,8 +1836,8 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $appli .= " ".DOL_VERSION; } - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { - $appli .= "
".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; + if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { + $appli .= "
".$langs->trans("LevelOfFeature").': '.getDolGlobalInt('MAIN_FEATURES_LEVEL'); } $logouttext = ''; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 536eb0546cc..2f272ceca1c 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -833,7 +833,7 @@ print ''; print ''; if (!empty($conf->expedition->enabled)) { - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { // Visible on experimental only because seems to not be implemented everywhere (only on proposal) + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') > 0) { // Visible on experimental only because seems to not be implemented everywhere (only on proposal) print ''; print ''; print ''; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 7d0c9b154c4..995558ae2f5 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -848,7 +848,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { + if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $permissiontowrite = $user->rights->societe->creer; $stripesupplieracc = $stripe->getStripeAccount($service, $object->id); // Get Stripe OAuth connect account (no network access here) diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 0bb351bf977..06f417e48df 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -356,7 +356,7 @@ print img_picto('', 'bank_account').' '; $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print ''; -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // What is this for ? +if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // What is this for ? print ''; } -// Warehouse for automatic decrement -//if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // warehouse to reduce stock for online payment -//{ -// print ''; -//} - print '
'.$langs->trans("AskForPreferredShippingMethod").' 
'; print $langs->trans("BankAccountForBankTransfer").''; print img_picto('', 'bank_account').' '; @@ -446,15 +446,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code print '
'; -// print $langs->trans("ONLINE_PAYMENT_WAREHOUSE").''; -// print $formproduct->selectWarehouses($conf->global->ONLINE_PAYMENT_WAREHOUSE, 'ONLINE_PAYMENT_WAREHOUSE', '', 1, $disabled); -// print '
'; print $langs->trans("CSSUrlForPaymentForm").''; print ''; diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index a9e5e80c009..f193af733c9 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -53,7 +53,7 @@ div.mainmenu.bank::before { content: "\f19c"; } -global->MAIN_FEATURES_LEVEL == 2) { ?> + /* TESTING USAGE OF SVG WITHOUT FONT */ div.mainmenu.cashdesk { line-height: 26px;