Ajout date création sur boite dernier client, fournisseurs, prospect enregsitrés
This commit is contained in:
parent
b3ad4f95ad
commit
736dca48c5
@ -66,7 +66,7 @@ class box_clients extends ModeleBoxes {
|
|||||||
|
|
||||||
if ($user->rights->societe->lire)
|
if ($user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom,s.idp";
|
$sql = "SELECT s.nom, s.idp, ".$db->pdate("s.datec")." as dc";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -86,7 +86,7 @@ class box_clients extends ModeleBoxes {
|
|||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
//$customerstatic=new Client($db);
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
@ -96,8 +96,28 @@ class box_clients extends ModeleBoxes {
|
|||||||
'text' => stripslashes($objp->nom),
|
'text' => stripslashes($objp->nom),
|
||||||
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp);
|
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp);
|
||||||
|
|
||||||
|
$this->info_box_contents[$i][1] = array('align' => 'right',
|
||||||
|
'text' => dolibarr_print_date($objp->dc, "day"));
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$i=$num;
|
||||||
|
while ($i < $max)
|
||||||
|
{
|
||||||
|
if ($num==0 && $i==$num)
|
||||||
|
{
|
||||||
|
$this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoRecordedCustomers"));
|
||||||
|
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][2] = array('text'=>' ');
|
||||||
|
} else {
|
||||||
|
$this->info_box_contents[$i][0] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][2] = array('text'=>' ');
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class box_fournisseurs extends ModeleBoxes {
|
|||||||
|
|
||||||
if ($user->rights->societe->lire)
|
if ($user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom,s.idp";
|
$sql = "SELECT s.nom, s.idp, ".$db->pdate("s.datec")." as dc";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -83,10 +83,10 @@ class box_fournisseurs extends ModeleBoxes {
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
//$supplierstatic=new Fournisseur($db);
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
@ -95,9 +95,29 @@ class box_fournisseurs extends ModeleBoxes {
|
|||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'text' => $objp->nom,
|
'text' => $objp->nom,
|
||||||
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->idp);
|
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->idp);
|
||||||
|
|
||||||
|
$this->info_box_contents[$i][1] = array('align' => 'right',
|
||||||
|
'text' => dolibarr_print_date($objp->dc, "day"));
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$i=$num;
|
||||||
|
while ($i < $max)
|
||||||
|
{
|
||||||
|
if ($num==0 && $i==$num)
|
||||||
|
{
|
||||||
|
$this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoRecordedSuppliers"));
|
||||||
|
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][2] = array('text'=>' ');
|
||||||
|
} else {
|
||||||
|
$this->info_box_contents[$i][0] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][2] = array('text'=>' ');
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class box_prospect extends ModeleBoxes {
|
|||||||
|
|
||||||
if ($user->rights->societe->lire)
|
if ($user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom, s.idp, s.fk_stcomm";
|
$sql = "SELECT s.nom, s.idp, s.fk_stcomm, ".$db->pdate("s.datec")." as dc";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -99,9 +99,12 @@ class box_prospect extends ModeleBoxes {
|
|||||||
'text' => stripslashes($objp->nom),
|
'text' => stripslashes($objp->nom),
|
||||||
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?id=".$objp->idp);
|
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?id=".$objp->idp);
|
||||||
|
|
||||||
$this->info_box_contents[$i][1] = array('align' => 'right',
|
$this->info_box_contents[$i][1] = array('align' => 'ce,ter',
|
||||||
|
'text' => dolibarr_print_date($objp->dc, "day"));
|
||||||
|
|
||||||
|
$this->info_box_contents[$i][2] = array('align' => 'right',
|
||||||
'text' => $prospectstatic->LibStatut($objp->fk_stcomm,3));
|
'text' => $prospectstatic->LibStatut($objp->fk_stcomm,3));
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,10 +116,12 @@ class box_prospect extends ModeleBoxes {
|
|||||||
$this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoRecordedProspects"));
|
$this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoRecordedProspects"));
|
||||||
$this->info_box_contents[$i][1] = array('text'=>' ');
|
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||||
$this->info_box_contents[$i][2] = array('text'=>' ');
|
$this->info_box_contents[$i][2] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][3] = array('text'=>' ');
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[$i][0] = array('text'=>' ');
|
$this->info_box_contents[$i][0] = array('text'=>' ');
|
||||||
$this->info_box_contents[$i][1] = array('text'=>' ');
|
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||||
$this->info_box_contents[$i][2] = array('text'=>' ');
|
$this->info_box_contents[$i][2] = array('text'=>' ');
|
||||||
|
$this->info_box_contents[$i][3] = array('text'=>' ');
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user