Fix: Picto d'alerte de retard ne s'affichait pas quand il faut.

This commit is contained in:
Laurent Destailleur 2007-02-10 16:21:11 +00:00
parent 83479a8a10
commit 3d7cd604e1
2 changed files with 11 additions and 6 deletions

View File

@ -60,7 +60,7 @@ class box_factures_fourn_imp extends ModeleBoxes {
*/
function loadBox($max=5)
{
global $user, $langs, $db;
global $conf, $user, $langs, $db;
include_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
$facturestatic=new FactureFournisseur($db);
@ -71,7 +71,8 @@ class box_factures_fourn_imp extends ModeleBoxes {
{
$sql = "SELECT s.nom, s.idp,";
$sql.= " f.facnumber,f.amount,".$db->pdate("f.datef")." as df,";
$sql.= " f.facnumber,".$db->pdate("f.date_lim_reglement")." as datelimite,";
$sql.= " f.amount,".$db->pdate("f.datef")." as df,";
$sql.= " f.paye, f.fk_statut, f.rowid as facid";
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f";
@ -96,9 +97,13 @@ class box_factures_fourn_imp extends ModeleBoxes {
{
$objp = $db->fetch_object($result);
$late="";
if ($objp->datelimite < (time() - $conf->facture->fournisseur->warning_delay)) $late=img_warning($langs->trans("Late"));
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => $this->boximg,
'text' => $objp->facnumber,
'text2'=> $late,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
$this->info_box_contents[$i][1] = array('align' => 'left',

View File

@ -62,7 +62,7 @@ class box_factures_imp extends ModeleBoxes {
*/
function loadBox($max=5)
{
global $user, $langs, $db;
global $conf, $user, $langs, $db;
$facturestatic=new Facture($db);
@ -99,14 +99,14 @@ class box_factures_imp extends ModeleBoxes {
$objp = $db->fetch_object($result);
$late="";
if ($objp->datelimite < (time() - $conf->facture->fournisseur->warning_delay)) $late=img_warning($langs->trans("Late"));
if ($objp->datelimite < (time() - $conf->facture->warning_delay)) $late=img_warning($langs->trans("Late"));
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => $this->boximg,
'text' => $objp->facnumber,
'text2'=> $late,
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
$this->info_box_contents[$i][1] = array('align' => 'left',
'text' => $objp->nom,
'maxlength'=>44,
@ -115,7 +115,7 @@ class box_factures_imp extends ModeleBoxes {
$this->info_box_contents[$i][2] = array(
'align' => 'right',
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3));
$i++;
}
}