Skip to content
Snippets Groups Projects
Commit 1c091ce2 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Je remet la liste des actions sur le coté droit car cela rend inaccessible...

Je remet la liste des actions sur le coté droit car cela rend inaccessible (hors écran), les zones de
recherche et accès rapide qui sont les plus utilisés et cela rompt avec l'uniformité des autres écrans.
Par contre, on laisse les "actions à faire" en haut car c'est en effet, les éléments importants de l'écran.
parent c7cbacc1
Branches
Tags
No related merge requests found
...@@ -84,71 +84,9 @@ print_fiche_titre($langs->trans("CommercialArea")); ...@@ -84,71 +84,9 @@ print_fiche_titre($langs->trans("CommercialArea"));
print '<table border="0" width="100%" class="notopnoleftnoright">'; print '<table border="0" width="100%" class="notopnoleftnoright">';
print '<tr><td valign="top" width="100%" class="notopnoleft">';
/*
* Actions commerciales a faire
*
*/
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code, c.libelle, a.fk_user_author, s.nom as sname, s.idp";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s";
$sql .= " WHERE c.id=a.fk_action AND a.percent < 100 AND s.idp = a.fk_soc";
if ($socidp)
{
$sql .= " AND s.idp = $socidp";
}
$sql .= " ORDER BY a.datea ASC";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
if ($num > 0)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ActionsToDo").'</td></tr>';
$var = true;
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"action/fiche.php?id=$obj->id\">".img_object($langs->trans("ShowTask"),"task");
$transcode=$langs->trans("Action".$obj->code);
$libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
print $libelle;
print '</a></td>';
print "<td>".$obj->label."</td>";
print '<td>'. dolibarr_print_date($obj->da);
if (date("U",$obj->da) < time())
{
print img_warning("Late");
}
print "</td>";
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCustomer"),"company").' '.$obj->sname.'</a></td>';
$i++;
}
// TODO Ajouter rappel pour "il y a des contrats mettre en service"
// TODO Ajouter rappel pour "il y a des contrats qui arrivent expiration"
print "</table><br>";
}
$db->free($resql);
}
else
{
dolibarr_print_error($db);
}
print '</td></tr></table>';
print '<table border="0" width="100%" class="notopnoleftnoright">';
print '<tr><td valign="top" width="30%" class="notopnoleft">'; print '<tr><td valign="top" width="30%" class="notopnoleft">';
/* /*
* Recherche Propal * Recherche Propal
*/ */
...@@ -323,6 +261,65 @@ if ( $db->query($sql) ) ...@@ -323,6 +261,65 @@ if ( $db->query($sql) )
print '</td><td valign="top" width="70%" class="notopnoleftnoright">'; print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
/*
* Actions commerciales a faire
*
*/
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code, c.libelle, a.fk_user_author, s.nom as sname, s.idp";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s";
$sql .= " WHERE c.id=a.fk_action AND a.percent < 100 AND s.idp = a.fk_soc";
if ($socidp)
{
$sql .= " AND s.idp = $socidp";
}
$sql .= " ORDER BY a.datea ASC";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
if ($num > 0)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("ActionsToDo").'</td></tr>';
$var = true;
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"action/fiche.php?id=$obj->id\">".img_object($langs->trans("ShowTask"),"task");
$transcode=$langs->trans("Action".$obj->code);
$libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
print $libelle;
print '</a></td>';
print '<td>'. dolibarr_print_date($obj->da);
if (date("U",$obj->da) < time())
{
print img_warning("Late");
}
print "</td>";
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCustomer"),"company").' '.$obj->sname.'</a></td>';
$i++;
}
// TODO Ajouter rappel pour "il y a des contrats mettre en service"
// TODO Ajouter rappel pour "il y a des contrats qui arrivent expiration"
print "</table><br>";
}
$db->free($resql);
}
else
{
dolibarr_print_error($db);
}
/* /*
* Derniers clients enregistrs * Derniers clients enregistrs
*/ */
...@@ -370,6 +367,7 @@ if ($user->rights->societe->lire) ...@@ -370,6 +367,7 @@ if ($user->rights->societe->lire)
} }
} }
/* /*
* Dernires actions commerciales effectues * Dernires actions commerciales effectues
*/ */
...@@ -421,6 +419,7 @@ else ...@@ -421,6 +419,7 @@ else
dolibarr_print_error($db); dolibarr_print_error($db);
} }
/* /*
* Derniers contrat * Derniers contrat
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment