diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 91ae4345214..42257707ea2 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -2210,7 +2210,7 @@ if ($id > 0) {
$delallowed = $user->rights->agenda->myactions->create;
- print $formfile->showdocuments('actions', $object->id, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 0, 0, '', '', '', $object->default_lang);
+ print $formfile->showdocuments('actions', $object->id, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 0, 0, '', '', '', $langs->getDefaultLang());
print '
';
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 82a2161f89f..82c26b559d2 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -1031,6 +1031,7 @@ print "\n";
$i = 0;
$totalarray = array();
+$totalarray['nbfield'] = 0;
while ($i < min($num, $limit)) {
$obj = $db->fetch_object($resql);
diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php
index 70dd0077e57..fc2210eabd8 100644
--- a/htdocs/core/extrafieldsinexport.inc.php
+++ b/htdocs/core/extrafieldsinexport.inc.php
@@ -48,7 +48,7 @@ if ($resql) { // This can fail when class is used on old database (during mig
case 'sellist':
$tmp = '';
$tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
- if ($tmpparam['options'] && is_array($tmpparam['options'])) {
+ if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
$tmpkeys = array_keys($tmpparam['options']);
$tmp = array_shift($tmpkeys);
}
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 8293d3d1c65..1a8d15a4fc4 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -1045,7 +1045,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$line2 .= ($line2 ? " - " : "").$fromcompany->email;
}
}
- if ($showdetails == 2 || $showdetails == 3 || ($fromcompany->country_code == 'DE')) {
+ if ($showdetails == 2 || $showdetails == 3 || (!empty($fromcompany->country_code) && $fromcompany->country_code == 'DE')) {
// Managers
if ($fromcompany->managers) {
$line2 .= ($line2 ? " - " : "").$fromcompany->managers;
@@ -1054,11 +1054,11 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
// Line 3 of company infos
// Juridical status
- if ($fromcompany->forme_juridique_code) {
+ if (!empty($fromcompany->forme_juridique_code) && $fromcompany->forme_juridique_code) {
$line3 .= ($line3 ? " - " : "").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
}
// Capital
- if ($fromcompany->capital) {
+ if (!empty($fromcompany->capital) && $fromcompany->capital) {
$tmpamounttoshow = price2num($fromcompany->capital); // This field is a free string
if (is_numeric($tmpamounttoshow) && $tmpamounttoshow > 0) {
$line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", price($tmpamounttoshow, 0, $outputlangs, 0, 0, 0, $conf->currency));
@@ -1067,7 +1067,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
}
}
// Prof Id 1
- if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) {
+ if (!empty($fromcompany->idprof1) && $fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) {
$field = $outputlangs->transcountrynoentities("ProfId1", $fromcompany->country_code);
if (preg_match('/\((.*)\)/i', $field, $reg)) {
$field = $reg[1];
@@ -1075,7 +1075,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$line3 .= ($line3 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1);
}
// Prof Id 2
- if ($fromcompany->idprof2) {
+ if (!empty($fromcompany->idprof2) && $fromcompany->idprof2) {
$field = $outputlangs->transcountrynoentities("ProfId2", $fromcompany->country_code);
if (preg_match('/\((.*)\)/i', $field, $reg)) {
$field = $reg[1];
@@ -1085,7 +1085,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
// Line 4 of company infos
// Prof Id 3
- if ($fromcompany->idprof3) {
+ if (!empty($fromcompany->idprof3) && $fromcompany->idprof3) {
$field = $outputlangs->transcountrynoentities("ProfId3", $fromcompany->country_code);
if (preg_match('/\((.*)\)/i', $field, $reg)) {
$field = $reg[1];
@@ -1093,7 +1093,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3);
}
// Prof Id 4
- if ($fromcompany->idprof4) {
+ if (!empty($fromcompany->idprof4) && $fromcompany->idprof4) {
$field = $outputlangs->transcountrynoentities("ProfId4", $fromcompany->country_code);
if (preg_match('/\((.*)\)/i', $field, $reg)) {
$field = $reg[1];
@@ -1101,7 +1101,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4);
}
// Prof Id 5
- if ($fromcompany->idprof5) {
+ if (!empty($fromcompany->idprof5) && $fromcompany->idprof5) {
$field = $outputlangs->transcountrynoentities("ProfId5", $fromcompany->country_code);
if (preg_match('/\((.*)\)/i', $field, $reg)) {
$field = $reg[1];
@@ -1109,7 +1109,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof5);
}
// Prof Id 6
- if ($fromcompany->idprof6) {
+ if (!empty($fromcompany->idprof6) && $fromcompany->idprof6) {
$field = $outputlangs->transcountrynoentities("ProfId6", $fromcompany->country_code);
if (preg_match('/\((.*)\)/i', $field, $reg)) {
$field = $reg[1];
@@ -1117,7 +1117,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof6);
}
// IntraCommunautary VAT
- if ($fromcompany->tva_intra != '') {
+ if (!empty($fromcompany->tva_intra) && $fromcompany->tva_intra != '') {
$line4 .= ($line4 ? " - " : "").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
}
diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
index 49e311f1c89..2259897f044 100644
--- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
@@ -282,7 +282,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$sepaname = '______________________________________________';
if ($thirdparty->id > 0) {
- $sepaname = $thirdparty->name.($object->account_owner ? ' ('.$object->account_owner.')' : '');
+ $sepaname = $thirdparty->name.($object->proprio ? ' ('.$object->proprio.')' : '');
}
$posY = $pdf->GetY();
$posY += 3;
diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php
index c18b768a724..c44b290bb0e 100644
--- a/htdocs/core/modules/societe/mod_codeclient_elephant.php
+++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php
@@ -132,7 +132,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
// Parametrage du prefix customers
$texte .= '
| '.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'): | ';
- $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).' | ';
+ $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).' | ';
$texte .= ' | ';
@@ -140,7 +140,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
// Parametrage du prefix suppliers
$texte .= '
| '.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'): | ';
- $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).' | ';
+ $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).' | ';
$texte .= '
';
$texte .= '';
diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
index 00a22934f78..80d6cd7da56 100644
--- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
@@ -53,6 +53,9 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
print '';
if (!$i) {
+ if (empty($totalarray)) {
+ $totalarray['nbfield'] = 0;
+ }
$totalarray['nbfield']++;
}
diff --git a/htdocs/document.php b/htdocs/document.php
index 7fc0dd6fff3..2a708ff3334 100644
--- a/htdocs/document.php
+++ b/htdocs/document.php
@@ -138,6 +138,7 @@ if (in_array($modulepart, array('facture_paiement', 'unpaid'))) {
*/
// If we have a hash public (hashp), we guess the original_file.
+$ecmfile='';
if (!empty($hashp)) {
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
$ecmfile = new EcmFiles($db);
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index dd4fd64a28c..b14d4a4efca 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2178,8 +2178,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '| '.$langs->trans("ManageLotSerial").' | ';
print $object->getLibStatut(0, 2);
print ' |
';
- if ((($object->status_batch == '1' && $conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
- || ($object->status_batch == '2' && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced' && $conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS))) {
+ if ((($object->status_batch == '1' && !empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
+ || ($object->status_batch == '2' && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced' && !empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS)))) {
print '| '.$langs->trans("ManageLotMask").' | ';
print $object->batch_mask;
print ' |
';
@@ -2689,7 +2689,6 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') {
// Documents
$objectref = dol_sanitizeFileName($object->ref);
- $relativepath = $comref.'/'.$objectref.'.pdf';
if (!empty($conf->product->multidir_output[$object->entity])) {
$filedir = $conf->product->multidir_output[$object->entity].'/'.$objectref; //Check repertories of current entities
} else {
@@ -2699,7 +2698,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') {
$genallowed = $usercanread;
$delallowed = $usercancreate;
- print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object);
+ print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $langs->getDefaultLang(), '', $object);
$somethingshown = $formfile->numoffiles;
print '';
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index a3ae38184e9..02e0211c01d 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -931,7 +931,7 @@ END;
'pfp.fk_availability'=>array('label'=>$langs->trans("Availability"), 'enabled' => !empty($conf->global->FOURN_PRODUCT_AVAILABILITY), 'checked'=>0, 'position'=>4),
'pfp.quantity'=>array('label'=>$langs->trans("QtyMin"), 'checked'=>1, 'position'=>5),
'pfp.unitprice'=>array('label'=>$langs->trans("UnitPriceHT"), 'checked'=>1, 'position'=>9),
- 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => $conf->multicurrency->enabled, 'checked'=>0, 'position'=>10),
+ 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => (!empty($conf->multicurrency->enabled)), 'checked'=>0, 'position'=>10),
'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>1, 'position'=>13),
'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>1, 'position'=>14),
'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>15),
@@ -942,14 +942,19 @@ END;
// fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label("product_fournisseur_price");
- $extralabels = $extrafields->attributes["product_fournisseur_price"]['label'];
+ if ($extrafields->attributes["product_fournisseur_price"] && array_key_exists('label', $extrafields->attributes["product_fournisseur_price"])) {
+ $extralabels = $extrafields->attributes["product_fournisseur_price"]['label'];
- if (!empty($extralabels)) {
- foreach ($extralabels as $key => $value) {
- // Show field if not hidden
- if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) {
- $extratitle = $langs->trans($value);
- $arrayfields['ef.'.$key] = array('label'=>$extratitle, 'checked'=>0, 'position'=>(end($arrayfields)['position'] + 1), 'langfile'=>$extrafields->attributes["product_fournisseur_price"]['langfile'][$key], 'help'=>$extrafields->attributes["product_fournisseur_price"]['help'][$key]);
+ if (!empty($extralabels)) {
+ foreach ($extralabels as $key => $value) {
+ // Show field if not hidden
+ if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) {
+ $extratitle = $langs->trans($value);
+ $arrayfields['ef.' . $key] = array('label' => $extratitle, 'checked' => 0,
+ 'position' => (end($arrayfields)['position'] + 1),
+ 'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key],
+ 'help' => $extrafields->attributes["product_fournisseur_price"]['help'][$key]);
+ }
}
}
}
@@ -1023,29 +1028,31 @@ END;
// fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label("product_fournisseur_price");
- $extralabels = $extrafields->attributes["product_fournisseur_price"]['label'];
+ if ($extrafields->attributes["product_fournisseur_price"] && array_key_exists('label', $extrafields->attributes["product_fournisseur_price"])) {
+ $extralabels = $extrafields->attributes["product_fournisseur_price"]['label'];
- if (!empty($extralabels)) {
- foreach ($extralabels as $key => $value) {
- // Show field if not hidden
- if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) {
- if (!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) {
- $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]);
- }
- if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) {
- $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key]));
- } else {
- $extratitle = $langs->trans($value);
- }
- if (!empty($arrayfields['ef.'.$key]['checked'])) {
- print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right ');
+ if (!empty($extralabels)) {
+ foreach ($extralabels as $key => $value) {
+ // Show field if not hidden
+ if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) {
+ if (!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) {
+ $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]);
+ }
+ if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) {
+ $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key]));
+ } else {
+ $extratitle = $langs->trans($value);
+ }
+ if (!empty($arrayfields['ef.' . $key]['checked'])) {
+ print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.' . $key, '', $param, '', $sortfield, $sortorder, 'right ');
+ }
}
}
}
}
if (is_object($hookmanager)) {
- $parameters = array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id);
+ $parameters = array('id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action);
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
@@ -1213,7 +1220,7 @@ END;
}
if (is_object($hookmanager)) {
- $parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>$id_fourn, 'prod_id'=>$object->id);
+ $parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action);
}
diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php
index 18bc3a3785b..536eb0546cc 100644
--- a/htdocs/societe/admin/societe.php
+++ b/htdocs/societe/admin/societe.php
@@ -746,7 +746,7 @@ if (!$conf->use_javascript_ajax) {
'2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 2).')',
'3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 3).')',
);
- print $form->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
+ print $form->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, (property_exists($conf->global, 'COMPANY_USE_SEARCH_TO_SELECT')?$conf->global->COMPANY_USE_SEARCH_TO_SELECT:''), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
print '
';
print '';
print " | ";
@@ -767,7 +767,7 @@ if (!$conf->use_javascript_ajax) {
'2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 2).')',
'3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 3).')',
);
- print $form->selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, $conf->global->CONTACT_USE_SEARCH_TO_SELECT, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
+ print $form->selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, (property_exists($conf->global, 'CONTACT_USE_SEARCH_TO_SELECT')?$conf->global->CONTACT_USE_SEARCH_TO_SELECT:''), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
print '';
print '';
print " | ";
@@ -870,7 +870,7 @@ if (empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
print '';
print '| '.$langs->trans("DefaultCustomerType").' | ';
print '';
- print $formcompany->selectProspectCustomerType($conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT, 'defaultcustomertype', 'defaultcustomertype', 'admin');
+ print $formcompany->selectProspectCustomerType((property_exists($conf->global, 'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')?$conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT:''), 'defaultcustomertype', 'defaultcustomertype', 'admin');
print ' | ';
print '';
print '';
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index c4bd26e1fc2..d9abbd61c22 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -50,6 +50,8 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+$optioncss = GETPOST('optioncss', 'alpha');
+
if (empty($page) || $page == -1) {
$page = 0;
} // If $page is not defined, or '' or -1
@@ -160,16 +162,16 @@ if ($object->client) {
$obj = $db->fetch_object($resql);
$nbFactsClient = $obj->nb;
$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');
}
}
@@ -219,6 +221,7 @@ print ' |
\n";
foreach ($rib_list as $rib) {
@@ -1393,7 +1393,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$out = '';
if (is_array($modellist) && count($modellist)) {
- $out .= '