diff --git a/htdocs/includes/boxes/box_factures_imp.php b/htdocs/includes/boxes/box_factures_imp.php index 700cb25e834..4a12588d67f 100644 --- a/htdocs/includes/boxes/box_factures_imp.php +++ b/htdocs/includes/boxes/box_factures_imp.php @@ -25,29 +25,33 @@ $info_box_head[] = array('text' => "Factures Impay $info_box_contents = array(); - $sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid"; $sql .= " FROM llx_societe as s,llx_facture as f WHERE f.fk_soc = s.idp AND f.paye=0"; $sql .= " ORDER BY f.datef DESC, f.facnumber DESC "; $sql .= $db->plimit(5, 0); $result = $db->query($sql); -if ($result) { +if ($result) +{ $num = $db->num_rows(); $i = 0; - while ($i < $num) { - $objp = $db->fetch_object( $i); + while ($i < $num) + { + $objp = $db->fetch_object( $i); - $info_box_contents[$i] = array('align' => 'center', - 'text' => $objp->facnumber . " " . $objp->nom, - 'url' => "/compta/facture.php3?facid=".$objp->facid); - $i++; - } + $info_box_contents[$i][0] = array('align' => 'left', + 'text' => $objp->facnumber, + 'url' => DOL_URL_ROOT."/compta/facture.php3?facid=".$objp->facid); + + $info_box_contents[$i][1] = array('align' => 'left', + 'text' => $objp->nom, + 'url' => DOL_URL_ROOT."/comm/fiche.php3?socid=".$objp->idp); + + $i++; + } } new infoBox($info_box_head, $info_box_contents); - - ?>