diff --git a/htdocs/includes/boxes/box_factures_fourn_imp.php b/htdocs/includes/boxes/box_factures_fourn_imp.php index e48c0847de7..17992bb02ea 100644 --- a/htdocs/includes/boxes/box_factures_fourn_imp.php +++ b/htdocs/includes/boxes/box_factures_fourn_imp.php @@ -96,6 +96,20 @@ class box_factures_fourn_imp extends ModeleBoxes { $i++; } + + $i=$num; + while ($i < $max) + { + if ($num==0 && $i==$num) + { + $this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoSupplierBillsUnpayed")); + $this->info_box_contents[$i][1] = array('text'=>' '); + } else { + $this->info_box_contents[$i][0] = array('text'=>' '); + $this->info_box_contents[$i][1] = array('text'=>' '); + } + $i++; + } } else { dolibarr_print_error($db); diff --git a/htdocs/includes/boxes/box_prospect.php b/htdocs/includes/boxes/box_prospect.php index fa2ae079193..0c61f97b806 100644 --- a/htdocs/includes/boxes/box_prospect.php +++ b/htdocs/includes/boxes/box_prospect.php @@ -93,8 +93,22 @@ class box_prospect extends ModeleBoxes { $i++; } - } + + $i=$num; + while ($i < $max) + { + if ($num==0 && $i==$num) + { + $this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoRecordedProspects")); + $this->info_box_contents[$i][1] = array('text'=>' '); + } else { + $this->info_box_contents[$i][0] = array('text'=>' '); + $this->info_box_contents[$i][1] = array('text'=>' '); + } + $i++; + } + } } else { $this->info_box_contents[0][0] = array('align' => 'left', diff --git a/htdocs/includes/boxes/box_services_vendus.php b/htdocs/includes/boxes/box_services_vendus.php index 0e26003944a..cce6220785e 100644 --- a/htdocs/includes/boxes/box_services_vendus.php +++ b/htdocs/includes/boxes/box_services_vendus.php @@ -22,9 +22,9 @@ */ /** - \file htdocs/includes/boxes/box_services_vendus.php - \ingroup produits,services - \brief Module de génération de l'affichage de la box services_vendus + \file htdocs/includes/boxes/box_services_vendus.php + \ingroup produits,services + \brief Module de génération de l'affichage de la box services_vendus */ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php"); @@ -89,10 +89,12 @@ class box_services_vendus extends ModeleBoxes { $this->info_box_contents[$i][0] = array('align' => 'left', 'logo' => ($objp->fk_product_type?'object_service':'object_product'), 'text' => $objp->label, + 'maxlength' => 16, 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('align' => 'left', 'text' => $objp->nom, + 'maxlength' => 48, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp); $i++; diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php index e1989e60218..ed3e46907a9 100644 --- a/htdocs/includes/boxes/modules_boxes.php +++ b/htdocs/includes/boxes/modules_boxes.php @@ -36,7 +36,7 @@ class ModeleBoxes { - var $MAXLENGTHBOX=70; // Mettre 0 pour pas de limite + var $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite var $error=''; @@ -102,13 +102,16 @@ class ModeleBoxes print img_object($langs->trans("Show"),$logo); print ''; } - if ($this->MAXLENGTHBOX && strlen($textewithnotags) > $this->MAXLENGTHBOX) + $maxlength=$this->MAXLENGTHBOX; + if (isset($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength']; + + if ($maxlength && strlen($textewithnotags) > $maxlength) { - $texte=substr($texte,0,$this->MAXLENGTHBOX)."..."; + $texte=substr($texte,0,$maxlength)."..."; } - if ($this->MAXLENGTHBOX && strlen($texte2withnotags) > $this->MAXLENGTHBOX) + if ($maxlength && strlen($texte2withnotags) > $maxlength) { - $texte2=substr($texte2,0,$this->MAXLENGTHBOX)."..."; + $texte2=substr($texte2,0,$maxlength)."..."; } print $texte; if ($contents[$i][$j]['url']) print '';