diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php
index ed2453ef793..bae229bc77b 100644
--- a/htdocs/adherents/admin/member.php
+++ b/htdocs/adherents/admin/member.php
@@ -108,7 +108,7 @@ if ($action == 'set_default') {
$res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity);
$res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
// Use vat for invoice creation
- if ($conf->facture->enabled) {
+ if (!empty($conf->facture->enabled)) {
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
@@ -256,7 +256,7 @@ print '';
print "\n";
// Use vat for invoice creation
-if ($conf->facture->enabled) {
+if (!empty($conf->facture->enabled)) {
print '
| '.$langs->trans("VATToUseForSubscriptions").' | ';
if (!empty($conf->banque->enabled)) {
print '';
diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index d01b160ca31..50e3faa7d51 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2022 Charlene Benke
*
* 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
@@ -592,15 +593,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
'recordjoinpiece'=>'AttachJoinedDocumentsToObject',
'recordevent'=>'RecordEvent');
$arrayoftypesnocondition = $arrayoftypes;
- if ($conf->projet->enabled) {
+ if (!empty($conf->projet->enabled)) {
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
}
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
- if ($conf->ticket->enabled) {
+ if (!empty($conf->ticket->enabled)) {
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
}
$arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
- if ($conf->recruitment->enabled) {
+ if (!empty($conf->recruitment->enabled)) {
$arrayoftypes['candidature'] = 'CreateCandidature';
}
$arrayoftypesnocondition['candidature'] = 'CreateCandidature';
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index e8f59727c07..a5e83155f03 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -394,7 +394,7 @@ print " | \n";
print "
\n";
// Option to force stock to be enough before adding a line into document
-if ($conf->invoice->enabled) {
+if (!empty($conf->invoice->enabled)) {
print '';
print '| '.$langs->trans("StockMustBeEnoughForInvoice").' | ';
print '';
@@ -408,7 +408,7 @@ if ($conf->invoice->enabled) {
print " |
\n";
}
-if ($conf->order->enabled) {
+if (!empty($conf->order->enabled)) {
print '';
print '| '.$langs->trans("StockMustBeEnoughForOrder").' | ';
print '';
@@ -422,7 +422,7 @@ if ($conf->order->enabled) {
print " |
\n";
}
-if ($conf->expedition->enabled) {
+if (!empty($conf->expedition->enabled)) {
print '';
print '| '.$langs->trans("StockMustBeEnoughForShipment").' | ';
print '';
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
index dc4b56b2763..b7fc682d2c6 100644
--- a/htdocs/contact/consumption.php
+++ b/htdocs/contact/consumption.php
@@ -153,16 +153,16 @@ print ' |
';
if ($object->thirdparty->client) {
$thirdTypeArray['customer'] = $langs->trans("customer");
- if ($conf->propal->enabled && $user->rights->propal->lire) {
+ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
$elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals');
}
- if ($conf->commande->enabled && $user->rights->commande->lire) {
+ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
$elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders');
}
- if ($conf->facture->enabled && $user->rights->facture->lire) {
+ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
}
- if ($conf->contrat->enabled && $user->rights->contrat->lire) {
+ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
}
}
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 5600f51f5e2..31a48f38cf4 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -346,7 +346,7 @@ class FormTicket
}
}
- if ($conf->knowledgemanagement->enabled) {
+ if (!empty($conf->knowledgemanagement->enabled)) {
// KM Articles
print '
';
print '