New: Ajout page des "Actions incompltes"
This commit is contained in:
parent
ee6ba13f08
commit
61fb5b71d6
@ -36,9 +36,7 @@ require_once("../../actioncomm.class.php");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
* Sécurité accés client
|
||||
*/
|
||||
// Sécurité accés client
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
@ -56,10 +54,11 @@ $offset = $limit * $page ;
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="a.datea";
|
||||
|
||||
$status=isset($_GET["status"])?$_GET["status"]:$_POST["status"];
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
/*
|
||||
* Affichage liste des actions
|
||||
*
|
||||
@ -68,7 +67,6 @@ llxHeader();
|
||||
$sql = "SELECT s.nom as societe, s.idp as socidp, s.client, a.id,".$db->pdate("a.datea")." as da, a.datea, c.code as acode, c.libelle, u.code, a.fk_contact, a.note, a.percent as percent";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE a.fk_soc = s.idp AND c.id=a.fk_action AND a.fk_user_author = u.rowid";
|
||||
|
||||
if ($_GET["type"])
|
||||
{
|
||||
$sql .= " AND c.id = ".$_GET["type"];
|
||||
@ -81,108 +79,116 @@ if ($socid)
|
||||
{
|
||||
$sql .= " AND s.idp = $socid";
|
||||
}
|
||||
$sql .= " ORDER BY a.datea DESC";
|
||||
if ($status == 'done') { $sql.= " AND a.percent = 100"; }
|
||||
if ($status == 'todo') { $sql.= " AND a.percent < 100"; }
|
||||
$sql .= " ORDER BY $sortfield $sortorder";
|
||||
$sql .= $db->plimit( $limit + 1, $offset);
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
if ($socid)
|
||||
$num = $db->num_rows($resql);
|
||||
$title="DoneAndToDoActions";
|
||||
if ($status == 'done') $title="DoneActions";
|
||||
if ($status == 'todo') $title="ToDoActions";
|
||||
|
||||
if ($socid)
|
||||
{
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch($socid);
|
||||
|
||||
print_barre_liste($langs->trans("DoneAndToDoTasksFor",$societe->nom), $page, "index.php",'',$sortfield,$sortorder,'',$num);
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch($socid);
|
||||
|
||||
print_barre_liste($langs->trans($title."For",$societe->nom), $page, "index.php",'',$sortfield,$sortorder,'',$num);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_barre_liste($langs->trans("DoneAndToDoTasks"), $page, "index.php",'',$sortfield,$sortorder,'',$num);
|
||||
}
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>'.$langs->trans("Action").'</td>';
|
||||
print '<td>'.$langs->trans("Company").'</td>';
|
||||
print '<td>'.$langs->trans("Contact").'</td>';
|
||||
print '<td>'.$langs->trans("Comments").'</td>';
|
||||
print '<td>'.$langs->trans("Author").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
else
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
if ($oldyear == strftime("%Y",$obj->da) )
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td width=\"30\">" .strftime("%Y",$obj->da)."</td>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
}
|
||||
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) )
|
||||
{
|
||||
print '<td width=\"20\"> </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td width=\"20\">" .strftime("%b",$obj->da)."</td>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
}
|
||||
|
||||
print "<td width=\"20\">" .strftime("%d",$obj->da)."</td>\n";
|
||||
print "<td width=\"30\">" .strftime("%H:%M",$obj->da)."</td>\n";
|
||||
if ($obj->percent < 100) {
|
||||
print "<td align=\"center\">".$obj->percent."%</td>";
|
||||
}
|
||||
else {
|
||||
print "<td align=\"center\">".$langs->trans("Done")."</td>";
|
||||
}
|
||||
print '<td><a href="fiche.php?id='.$obj->id.'">'.img_object($langs->trans("ShowTask"),"task").' ';
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print $libelle;
|
||||
print '</a></td>';
|
||||
|
||||
// Société
|
||||
print '<td>';
|
||||
if ($obj->client == 1) $url=DOL_URL_ROOT.'/comm/fiche.php?socid=';
|
||||
elseif ($obj->client == 2) $url=DOL_URL_ROOT.'/comm/prospect/fiche.php?id=';
|
||||
else $url=DOL_URL_ROOT.'/soc.php?socid=';
|
||||
print ' <a href="'.$url.$obj->socidp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->societe,32).'</a></td>';
|
||||
print_barre_liste($langs->trans($title), $page, "index.php",'',$sortfield,$sortorder,'',$num);
|
||||
}
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"a.datea","&status=$status",'','colspan="4"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent","&status=$status","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"acode","&status=$status","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","&status=$status","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact","&status=$status","","",$sortfield);
|
||||
print '<td>'.$langs->trans("Comments").'</td>';
|
||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.code","&status=$status","","",$sortfield);
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
// Contact
|
||||
print '<td>';
|
||||
if ($obj->fk_contact)
|
||||
{
|
||||
$cont = new Contact($db);
|
||||
$cont->fetch($obj->fk_contact);
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$cont->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.dolibarr_trunc($cont->fullname,32).'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print " ";
|
||||
}
|
||||
print '</td>';
|
||||
$var=!$var;
|
||||
|
||||
// Note
|
||||
print '<td>'.dolibarr_trunc($obj->note, 16).'</td>';
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
// Auteur
|
||||
print '<td align="center">'.$obj->code.'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
if ($oldyear == strftime("%Y",$obj->da) )
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td width=\"30\">" .strftime("%Y",$obj->da)."</td>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
}
|
||||
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) )
|
||||
{
|
||||
print '<td width=\"20\"> </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td width=\"20\">" .strftime("%b",$obj->da)."</td>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
}
|
||||
|
||||
print "<td width=\"20\">" .strftime("%d",$obj->da)."</td>\n";
|
||||
print "<td width=\"30\">" .strftime("%H:%M",$obj->da)."</td>\n";
|
||||
|
||||
if ($obj->percent < 100) {
|
||||
print "<td align=\"center\">".$obj->percent."%</td>";
|
||||
}
|
||||
else {
|
||||
print "<td align=\"center\">".$langs->trans("Done")."</td>";
|
||||
}
|
||||
|
||||
print '<td><a href="fiche.php?id='.$obj->id.'">'.img_object($langs->trans("ShowTask"),"task").' ';
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print dolibarr_trunc($libelle,16);
|
||||
print '</a></td>';
|
||||
|
||||
// Sociét
|
||||
print '<td>';
|
||||
if ($obj->client == 1) $url=DOL_URL_ROOT.'/comm/fiche.php?socid=';
|
||||
elseif ($obj->client == 2) $url=DOL_URL_ROOT.'/comm/prospect/fiche.php?id=';
|
||||
else $url=DOL_URL_ROOT.'/soc.php?socid=';
|
||||
print ' <a href="'.$url.$obj->socidp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->societe,32).'</a></td>';
|
||||
|
||||
// Contact
|
||||
print '<td>';
|
||||
if ($obj->fk_contact)
|
||||
{
|
||||
$cont = new Contact($db);
|
||||
$cont->fetch($obj->fk_contact);
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$cont->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.dolibarr_trunc($cont->fullname,32).'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print " ";
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Note
|
||||
print '<td>'.dolibarr_trunc($obj->note, 16).'</td>';
|
||||
|
||||
// Auteur
|
||||
print '<td align="center">'.$obj->code.'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
|
||||
@ -195,5 +201,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/comm/action/pre.inc.php
|
||||
\brief Fichier gestionnaire du menu de gauche de la zone actions
|
||||
\version $Revision$
|
||||
@ -29,43 +30,44 @@
|
||||
require("../../main.inc.php");
|
||||
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $conf,$user,$langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/comm/action/", $langs->trans("Actions"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/?time=today", $langs->trans("Today"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/", $langs->trans("Reporting"));
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->commercial->enabled) {
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled) {
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Propales"));
|
||||
}
|
||||
|
||||
if ($conf->projet->enabled) {
|
||||
$langs->load("projects");
|
||||
$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
|
||||
function llxHeader($head = "", $urlp = "")
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/comm/action/", $langs->trans("Actions"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?time=today", $langs->trans("Today"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?status=todo", $langs->trans("ToDoActions"), 1);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php", $langs->trans("Reporting"));
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->commercial->enabled) {
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled) {
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Propales"));
|
||||
}
|
||||
|
||||
if ($conf->projet->enabled) {
|
||||
$langs->load("projects");
|
||||
$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,7 +21,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*! \file htdocs/comm/action/rapport/pre.inc.php
|
||||
/**
|
||||
\file htdocs/comm/action/rapport/pre.inc.php
|
||||
\brief Fichier gestionnaire du menu de gauche de la zone rapport des actions
|
||||
\version $Revision$
|
||||
*/
|
||||
@ -28,43 +30,44 @@
|
||||
require("../../../main.inc.php");
|
||||
require("./rapport.pdf.php");
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $conf,$user,$langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/comm/action/", $langs->trans("Actions"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/?time=today", $langs->trans("Today"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/", $langs->trans("Reporting"));
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->commercial->enabled) {
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled) {
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Propales"));
|
||||
}
|
||||
|
||||
if ($conf->projet->enabled) {
|
||||
$langs->load("projects");
|
||||
$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
|
||||
function llxHeader($head = "", $urlp = "")
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/comm/action/", $langs->trans("Actions"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?time=today", $langs->trans("Today"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?status=todo", $langs->trans("ToDoActions"), 1);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php", $langs->trans("Reporting"));
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->commercial->enabled) {
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled) {
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Propales"));
|
||||
}
|
||||
|
||||
if ($conf->projet->enabled) {
|
||||
$langs->load("projects");
|
||||
$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -130,7 +130,7 @@ class MenuLeft {
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup"));
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup"));
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/admin/system/index.php?leftmenu=system", $langs->trans("System"));
|
||||
$newmenu->add(DOL_URL_ROOT."/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo"));
|
||||
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1);
|
||||
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/constall.php", $langs->trans("AllParameters"),2);
|
||||
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/about.php", $langs->trans("About"),2);
|
||||
@ -175,6 +175,7 @@ class MenuLeft {
|
||||
|
||||
// Actions
|
||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=actions", $langs->trans("Actions"), 0);
|
||||
if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?status=todo", $langs->trans("ToDoActions"), 1);
|
||||
if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?time=today", $langs->trans("Today"), 1);
|
||||
if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php", $langs->trans("Reportings"), 1);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user