diff --git a/htdocs/includes/boxes/box_actions.php b/htdocs/includes/boxes/box_actions.php index 7a1b295c40f..3f8cf309589 100644 --- a/htdocs/includes/boxes/box_actions.php +++ b/htdocs/includes/boxes/box_actions.php @@ -89,7 +89,7 @@ class box_actions extends ModeleBoxes { $result = $db->query($sql); if ($result) { - $now=gmmktime(); + $now=dol_now(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; $num = $db->num_rows($result); diff --git a/htdocs/includes/boxes/box_clients.php b/htdocs/includes/boxes/box_clients.php index cb2ca82d63c..9af751fb3e2 100644 --- a/htdocs/includes/boxes/box_clients.php +++ b/htdocs/includes/boxes/box_clients.php @@ -63,11 +63,14 @@ class box_clients extends ModeleBoxes { $this->max=$max; - $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedCustomers",$max)); + include_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); + $thirdpartystatic=new Societe($db); + + $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedCustomers",$max)); if ($user->rights->societe->lire) { - $sql = "SELECT s.nom, s.rowid as socid, s.datec, s.tms"; + $sql = "SELECT s.nom, s.rowid as socid, s.datec, s.tms, s.status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (1, 3)"; @@ -101,6 +104,9 @@ class box_clients extends ModeleBoxes { $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); + $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', + 'text' => $thirdpartystatic->LibStatut($objp->status,3)); + $i++; } diff --git a/htdocs/includes/boxes/box_fournisseurs.php b/htdocs/includes/boxes/box_fournisseurs.php index 3dbf7034b6f..aaffc5da19b 100644 --- a/htdocs/includes/boxes/box_fournisseurs.php +++ b/htdocs/includes/boxes/box_fournisseurs.php @@ -62,11 +62,14 @@ class box_fournisseurs extends ModeleBoxes { $this->max=$max; + include_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); + $thirdpartystatic=new Societe($db); + $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedSuppliers",$max)); if ($user->rights->societe->lire) { - $sql = "SELECT s.nom, s.rowid as socid, s.datec, s.tms"; + $sql = "SELECT s.nom, s.rowid as socid, s.datec, s.tms, s.status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fournisseur = 1"; @@ -100,6 +103,9 @@ class box_fournisseurs extends ModeleBoxes { $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); + $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', + 'text' => $thirdpartystatic->LibStatut($objp->status,3)); + $i++; } diff --git a/htdocs/includes/boxes/box_members.php b/htdocs/includes/boxes/box_members.php index 2b04d7bd336..5eafd54e4b6 100755 --- a/htdocs/includes/boxes/box_members.php +++ b/htdocs/includes/boxes/box_members.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ */ /** - * \file htdocs/includes/boxes/box_clients.php + * \file htdocs/includes/boxes/box_members.php * \ingroup societes * \brief Module de generation de l'affichage de la box clients * \version $Id$ @@ -63,13 +63,18 @@ class box_members extends ModeleBoxes { $this->max=$max; + include_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); + $memberstatic=new Adherent($db); + $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedMembers",$max)); if ($user->rights->societe->lire) { - $sql = "SELECT s.rowid, s.nom, s.prenom, s.datec, s.tms"; - $sql.= " FROM ".MAIN_DB_PREFIX."adherent as s"; + $sql = "SELECT s.rowid, s.nom, s.prenom, s.datec, s.tms, s.statut as status, s.datefin as date_end_subscription,"; + $sql.= " t.cotisation"; + $sql.= " FROM ".MAIN_DB_PREFIX."adherent as s, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE s.entity = ".$conf->entity; + $sql.= " AND s.fk_adherent_type = t.rowid"; $sql.= " ORDER BY s.tms DESC"; $sql.= $db->plimit($max, 0); @@ -97,6 +102,9 @@ class box_members extends ModeleBoxes { $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); + $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', + 'text' => $memberstatic->LibStatut($objp->status,$objp->cotisation,$db->jdate($objp->date_end_subscription),3)); + $i++; } diff --git a/htdocs/includes/boxes/box_prospect.php b/htdocs/includes/boxes/box_prospect.php index c971be0848d..bb51806e20a 100644 --- a/htdocs/includes/boxes/box_prospect.php +++ b/htdocs/includes/boxes/box_prospect.php @@ -67,11 +67,14 @@ class box_prospect extends ModeleBoxes { $this->max=$max; + include_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); + $thirdpartystatic=new Societe($db); + $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedProspects",$max)); if ($user->rights->societe->lire) { - $sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.datec, s.tms"; + $sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.datec, s.tms, s.status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (2, 3)"; @@ -109,7 +112,10 @@ class box_prospect extends ModeleBoxes { $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', 'text' => str_replace('img ','img height="14" ',$prospectstatic->LibProspStatut($objp->fk_stcomm,3))); - $i++; + $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + 'text' => $thirdpartystatic->LibStatut($objp->status,3)); + + $i++; } if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));