New: Enhancements for agenda module
This commit is contained in:
parent
fa33c48cbc
commit
9519e26fd9
@ -61,7 +61,8 @@ if ($_POST["action"] == 'add_action')
|
|||||||
|
|
||||||
if ($_POST['cancel'])
|
if ($_POST['cancel'])
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']);
|
if ($_POST['socid'] > 0) header("Location: ".DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']);
|
||||||
|
else header("Location: ".DOL_URL_ROOT.'/comm/action/indexactions.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,8 +47,15 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe', $socid,'');
|
$result = restrictedArea($user, 'societe', $socid,'');
|
||||||
|
|
||||||
if (! $user->rights->agenda->actions->read) $filter="mine";
|
$canedit=1;
|
||||||
|
if (! $user->rights->agenda->myactions->read) access_forbidden();
|
||||||
|
if (! $user->rights->agenda->allactions->read)
|
||||||
|
{
|
||||||
|
$canedit=0;
|
||||||
|
$filtera="on";
|
||||||
|
$filtert="on";
|
||||||
|
$filterd="on";
|
||||||
|
}
|
||||||
if ($page == -1) { $page = 0 ; }
|
if ($page == -1) { $page = 0 ; }
|
||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
@ -99,6 +106,14 @@ if (!$user->rights->societe->client->voir && !$socid) //restriction
|
|||||||
}
|
}
|
||||||
if ($status == 'done') { $sql.= " AND a.percent = 100"; }
|
if ($status == 'done') { $sql.= " AND a.percent = 100"; }
|
||||||
if ($status == 'todo') { $sql.= " AND a.percent < 100"; }
|
if ($status == 'todo') { $sql.= " AND a.percent < 100"; }
|
||||||
|
if ($filtera || $filtert || $filterd)
|
||||||
|
{
|
||||||
|
$sql.= " AND (";
|
||||||
|
if ($filtera) $sql.= " a.fk_user_author = ".$user->id;
|
||||||
|
if ($filtert) $sql.= ($filtera?" OR ":"")." a.fk_user_action = ".$user->id;
|
||||||
|
if ($filterd) $sql.= ($filtera||$filtert?" OR ":"")." a.fk_user_done = ".$user->id;
|
||||||
|
$sql.= ")";
|
||||||
|
}
|
||||||
$sql .= " ORDER BY ".$sortfield." ".$sortorder;
|
$sql .= " ORDER BY ".$sortfield." ".$sortorder;
|
||||||
$sql .= $db->plimit( $limit + 1, $offset);
|
$sql .= $db->plimit( $limit + 1, $offset);
|
||||||
|
|
||||||
@ -133,16 +148,17 @@ if ($resql)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $langs->trans("Filter");
|
print $langs->trans("Filter");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="checkbox" name="userasked" '.($filtera?'checked="true"':'').'> ';
|
print '<td><input type="checkbox" name="userasked" '.($canedit?'':'disabled="true" ').($filtera?'checked="true"':'').'> ';
|
||||||
print $langs->trans("MyActionsAsked");
|
print $langs->trans("MyActionsAsked");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="checkbox" name="usertodo" '.($filtert?'checked="true"':'').'> ';
|
print '<td><input type="checkbox" name="usertodo" '.($canedit?'':'disabled="true" ').($filtert?'checked="true"':'').'> ';
|
||||||
print $langs->trans("MyActionsToDo");
|
print $langs->trans("MyActionsToDo");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="checkbox" name="userdone" '.($filterd?'checked="true"':'').'> ';
|
print '<td><input type="checkbox" name="userdone" '.($canedit?'':'disabled="true" ').($filterd?'checked="true"':'').'> ';
|
||||||
print $langs->trans("MyActionsDone");
|
print $langs->trans("MyActionsDone");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("ToFilter").'">';
|
print '<td align="center">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("ToFilter").'" '.($canedit?'':'disabled="true"') .'>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</form><br>';
|
print '</form><br>';
|
||||||
|
|||||||
@ -44,188 +44,92 @@ if ($page == -1) { $page = 0 ; }
|
|||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
if (! $sortorder) $sortorder="DESC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
if (! $sortfield) $sortfield="a.datep";
|
if (! $sortfield) $sortfield="e.dateevent";
|
||||||
|
|
||||||
$status=isset($_GET["status"])?$_GET["status"]:$_POST["status"];
|
$status=isset($_GET["status"])?$_GET["status"]:$_POST["status"];
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
$userstatic=new User($db);
|
||||||
|
|
||||||
print $langs->trans("FeatureNotYetAvailable");
|
$sql = "SELECT e.rowid, e.type, ".$db->pdate("e.dateevent")." as dateevent,";
|
||||||
|
$sql.= " e.fk_user, e.label, e.description,";
|
||||||
|
$sql.= " u.login";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."events as e";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user";
|
||||||
|
$sql.= " ORDER BY $sortfield $sortorder";
|
||||||
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
/*
|
$result = $db->query($sql);
|
||||||
* Affichage liste des actions
|
if ($result)
|
||||||
*
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
$sql = "SELECT s.nom as societe, s.rowid as socid, s.client,";
|
|
||||||
$sql.= " a.id,".$db->pdate("a.datep")." as dp, ".$db->pdate("a.datea")." as da, a.fk_contact, a.note, a.label, a.percent as percent,";
|
|
||||||
$sql.= " c.code as acode, c.libelle,";
|
|
||||||
$sql.= " ut.login as logintodo, ut.rowid as useridtodo,";
|
|
||||||
$sql.= " ud.login as logindone, ud.rowid as useriddone,";
|
|
||||||
$sql.= " sp.name, sp.firstname";
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s,";
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
|
|
||||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ut ON a.fk_user_action = ut.rowid";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ud ON a.fk_user_done = ud.rowid";
|
|
||||||
$sql.= " WHERE a.fk_soc = s.rowid AND c.id = a.fk_action";
|
|
||||||
if ($_GET["type"])
|
|
||||||
{
|
{
|
||||||
$sql .= " AND c.id = ".$_GET["type"];
|
$num = $db->num_rows($result);
|
||||||
}
|
|
||||||
if ($_GET["time"] == "today")
|
|
||||||
{
|
|
||||||
$sql .= " AND date_format(a.datep, '%d%m%Y') = ".strftime("%d%m%Y",time());
|
|
||||||
}
|
|
||||||
if ($socid)
|
|
||||||
{
|
|
||||||
$sql .= " AND s.rowid = ".$socid;
|
|
||||||
}
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
|
||||||
{
|
|
||||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
|
|
||||||
dolibarr_syslog("comm/action/index.php sql=".$sql);
|
|
||||||
$resql=$db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$actionstatic=new ActionComm($db);
|
|
||||||
$societestatic=new Societe($db);
|
|
||||||
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$title="DoneAndToDoActions";
|
|
||||||
if ($status == 'done') $title="DoneActions";
|
|
||||||
if ($status == 'todo') $title="ToDoActions";
|
|
||||||
$param="&status=".$status;
|
|
||||||
|
|
||||||
if ($socid)
|
|
||||||
{
|
|
||||||
$societe = new Societe($db);
|
|
||||||
$societe->fetch($socid);
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans($title."For",$societe->nom), $page, "index.php",$param,$sortfield,$sortorder,'',$num);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print_barre_liste($langs->trans($title), $page, "index.php",$param,$sortfield,$sortorder,'',$num);
|
|
||||||
}
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
|
||||||
|
print_barre_liste($langs->trans("ListOfEvents"), $page, "listevents.php","",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"acode",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"e.dateevent","","",'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DatePlanShort"),$_SERVER["PHP_SELF"],"a.datep",$param,'','',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"e.type","","",'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateRealShort"),$_SERVER["PHP_SELF"],"a.datea",$param,'','',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"u.login","","",'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"e.label","","",'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder);
|
print '<td> </td>';
|
||||||
print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact",$param,"","",$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("AffectedTo"),$_SERVER["PHP_SELF"],"ut.login",$param,"","",$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("DoneBy"),$_SERVER["PHP_SELF"],"ud.login",$param,"","",$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder);
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$contactstatic = new Contact($db);
|
/*
|
||||||
|
// Lignes des champs de filtre
|
||||||
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
$var=true;
|
print '<td class="liste_titre"> </td>';
|
||||||
while ($i < min($num,$limit))
|
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|
||||||
|
print '<td align="left" class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_user"].'">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td align="left" class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_label"].'">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td align="right" class="liste_titre">';
|
||||||
|
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
print '</form>';
|
||||||
|
*/
|
||||||
|
$var=True;
|
||||||
|
|
||||||
|
while ($i < min($num,$conf->liste_limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object();
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
print '<td align="left" nowrap="nowrap">'.dolibarr_print_date($obj->dateevent,'dayhour').'</td>';
|
||||||
// Action (type)
|
print '<td>'.$obj->type.'</td>';
|
||||||
print '<td>';
|
$userstatic->id=$obj->fk_user;
|
||||||
$actionstatic->id=$obj->id;
|
$userstatic->login=$obj->login;
|
||||||
$actionstatic->code=$obj->acode;
|
print '<td>'.$userstatic->getLoginUrl(1).'</td>';
|
||||||
$actionstatic->libelle=$obj->libelle;
|
print '<td>'.$obj->label.'</td>';
|
||||||
print $actionstatic->getNomUrl(1,12);
|
// print '<td>'.$obj->description.'</td>';
|
||||||
print '</td>';
|
print '<td> </td>';
|
||||||
|
|
||||||
print '<td align="left" nowrap="nowrap">';
|
|
||||||
print dolibarr_print_date($obj->dp,"dayhour");
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td align="left" nowrap="nowrap">';
|
|
||||||
print dolibarr_print_date($obj->da,"dayhour");
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Titre
|
|
||||||
print '<td>';
|
|
||||||
print $obj->label;
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Société
|
|
||||||
print '<td>';
|
|
||||||
$societestatic->id=$obj->socid;
|
|
||||||
$societestatic->client=$obj->client;
|
|
||||||
$societestatic->nom=$obj->societe;
|
|
||||||
print $societestatic->getNomUrl(1,'',16);
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Contact
|
|
||||||
print '<td>';
|
|
||||||
if ($obj->fk_contact > 0)
|
|
||||||
{
|
|
||||||
$contactstatic->name=$obj->name;
|
|
||||||
$contactstatic->firstname=$obj->firstname;
|
|
||||||
$contactstatic->id=$obj->fk_contact;
|
|
||||||
print $contactstatic->getNomUrl(1,'',16);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print " ";
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// User to do
|
|
||||||
print '<td align="left">';
|
|
||||||
if ($obj->useridtodo)
|
|
||||||
{
|
|
||||||
$userstatic=new User($db,$obj->useridtodo);
|
|
||||||
$userstatic->id=$obj->useridtodo;
|
|
||||||
$userstatic->login=$obj->logintodo;
|
|
||||||
print $userstatic->getLoginUrl(1);
|
|
||||||
}
|
|
||||||
else print ' ';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// User did
|
|
||||||
print '<td align="left">';
|
|
||||||
if ($obj->useriddone)
|
|
||||||
{
|
|
||||||
$userstatic=new User($db,$obj->useriddone);
|
|
||||||
$userstatic->id=$obj->useriddone;
|
|
||||||
$userstatic->login=$obj->logindone;
|
|
||||||
print $userstatic->getLoginUrl(1);
|
|
||||||
}
|
|
||||||
else print ' ';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Status/Percent
|
|
||||||
print '<td align="right" nowrap="nowrap">'.$actionstatic->LibStatut($obj->percent,5).'</td>';
|
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free($resql);
|
$db->free();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ function llxHeader($head = "", $urlp = "")
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
||||||
@ -54,7 +54,7 @@ function llxHeader($head = "", $urlp = "")
|
|||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read);
|
||||||
|
|
||||||
|
|
||||||
if ($conf->societe->enabled) {
|
if ($conf->societe->enabled) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
|
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,16 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/comm/action/rapport/index.php
|
\file htdocs/comm/action/rapport/index.php
|
||||||
\ingroup commercial
|
\ingroup commercial
|
||||||
\brief Page accueil des rapports des actions
|
\brief Page accueil des rapports des actions
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("./pre.inc.php");
|
require_once("./pre.inc.php");
|
||||||
|
|||||||
@ -43,14 +43,15 @@ function llxHeader($head = "", $urlp = "")
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
||||||
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read);
|
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read);
|
||||||
|
|
||||||
|
|
||||||
if ($conf->societe->enabled) {
|
if ($conf->societe->enabled) {
|
||||||
|
|||||||
@ -269,7 +269,7 @@ class MenuLeft {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
@ -725,7 +725,7 @@ class MenuLeft {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
@ -735,7 +735,7 @@ class MenuLeft {
|
|||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -250,7 +250,7 @@ class MenuLeft {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
@ -697,7 +697,7 @@ class MenuLeft {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
||||||
@ -705,7 +705,7 @@ class MenuLeft {
|
|||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class modAgenda extends DolibarrModules
|
|||||||
// $r++;
|
// $r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 2401;
|
$this->rights[$r][0] = 2401;
|
||||||
$this->rights[$r][1] = 'Lire les actions liees a son compte';
|
$this->rights[$r][1] = 'Read actions/tasks linked to his account';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 1;
|
$this->rights[$r][3] = 1;
|
||||||
$this->rights[$r][4] = 'myactions';
|
$this->rights[$r][4] = 'myactions';
|
||||||
@ -107,7 +107,7 @@ class modAgenda extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 2402;
|
$this->rights[$r][0] = 2402;
|
||||||
$this->rights[$r][1] = 'Creer/modifier/supprimer les actions liees a son compte';
|
$this->rights[$r][1] = 'Create/modify/delete actions/tasks linked to his account';
|
||||||
$this->rights[$r][2] = 'w';
|
$this->rights[$r][2] = 'w';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'myactions';
|
$this->rights[$r][4] = 'myactions';
|
||||||
@ -115,7 +115,7 @@ class modAgenda extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 2403;
|
$this->rights[$r][0] = 2403;
|
||||||
$this->rights[$r][1] = 'Lire les actions des autres';
|
$this->rights[$r][1] = 'Read actions/tasks of others';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'allactions';
|
$this->rights[$r][4] = 'allactions';
|
||||||
@ -123,13 +123,21 @@ class modAgenda extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 2405;
|
$this->rights[$r][0] = 2405;
|
||||||
$this->rights[$r][1] = 'Creer/modifier/supprimer les actions pour les autres';
|
$this->rights[$r][1] = 'Create/modify/delete actions/tasks of others';
|
||||||
$this->rights[$r][2] = 'w';
|
$this->rights[$r][2] = 'w';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'allactions';
|
$this->rights[$r][4] = 'allactions';
|
||||||
$this->rights[$r][5] = 'create';
|
$this->rights[$r][5] = 'create';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
$this->rights[$r][0] = 2410;
|
||||||
|
$this->rights[$r][1] = 'Read Dolibarr audit events';
|
||||||
|
$this->rights[$r][2] = 'r';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'events';
|
||||||
|
$this->rights[$r][5] = 'read';
|
||||||
|
$r++;
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
//------
|
//------
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|||||||
@ -399,6 +399,11 @@ Permission1101=Read delivery orders
|
|||||||
Permission1102=Create/modify delivery orders
|
Permission1102=Create/modify delivery orders
|
||||||
Permission1104=Validate delivery orders
|
Permission1104=Validate delivery orders
|
||||||
Permission1109=Delete delivery orders
|
Permission1109=Delete delivery orders
|
||||||
|
Permission2401=Read actions/tasks linked to his account
|
||||||
|
Permission2402=Create/modify/delete actions/tasks linked to his account
|
||||||
|
Permission2403=Read actions/tasks of others
|
||||||
|
Permission2405=Create/modify/delete actions/tasks of others
|
||||||
|
Permission2410=Read Dolibarr audit events
|
||||||
DictionnaryCompanyType=Company types
|
DictionnaryCompanyType=Company types
|
||||||
DictionnaryCompanyJuridicalType=Juridical kinds of company
|
DictionnaryCompanyJuridicalType=Juridical kinds of company
|
||||||
DictionnaryCanton=Cantons
|
DictionnaryCanton=Cantons
|
||||||
|
|||||||
@ -9,3 +9,5 @@ DoneBy=Done by
|
|||||||
Events=Events
|
Events=Events
|
||||||
SearchAnAction=Search an action
|
SearchAnAction=Search an action
|
||||||
MenuDoneActions=Terminated actions
|
MenuDoneActions=Terminated actions
|
||||||
|
ListOfEvents=List of Dolibarr events
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ StatusActionToDo=To do
|
|||||||
StatusActionDone=Done
|
StatusActionDone=Done
|
||||||
MyActionsAsked=Actions I have asked
|
MyActionsAsked=Actions I have asked
|
||||||
MyActionsToDo=Actions I have to do
|
MyActionsToDo=Actions I have to do
|
||||||
MyActionsDone=Actions I have done
|
MyActionsDone=Actions affected to me
|
||||||
StatusActionInProcess=In process
|
StatusActionInProcess=In process
|
||||||
TasksHistoryForThisContact=Actions for this contact
|
TasksHistoryForThisContact=Actions for this contact
|
||||||
LastProspectDoNotContact=Do not contact
|
LastProspectDoNotContact=Do not contact
|
||||||
|
|||||||
@ -398,6 +398,11 @@ Permission1101=Consulter les bons de livraison
|
|||||||
Permission1102=Créer/modifier les bons de livraison
|
Permission1102=Créer/modifier les bons de livraison
|
||||||
Permission1104=Valider les bons de livraison
|
Permission1104=Valider les bons de livraison
|
||||||
Permission1109=Supprimer les bons de livraison
|
Permission1109=Supprimer les bons de livraison
|
||||||
|
Permission2401=Lire les actions/taches liees a son compte
|
||||||
|
Permission2402=Creer/modifier/supprimer les actions/taches liees a son compte
|
||||||
|
Permission2403=Lire les actions/taches des autres
|
||||||
|
Permission2405=Creer/modifier/supprimer les actions/taches pour les autres
|
||||||
|
Permission2410=Voir l'audit des évenements Dolibarr
|
||||||
DictionnaryCompanyType=Types de sociétés
|
DictionnaryCompanyType=Types de sociétés
|
||||||
DictionnaryCompanyJuridicalType=Formes juridiques
|
DictionnaryCompanyJuridicalType=Formes juridiques
|
||||||
DictionnaryCanton=Départements/Provinces/Cantons
|
DictionnaryCanton=Départements/Provinces/Cantons
|
||||||
|
|||||||
@ -9,3 +9,5 @@ DoneBy=R
|
|||||||
Events=Evênements
|
Events=Evênements
|
||||||
SearchAnAction=Rechercher une action
|
SearchAnAction=Rechercher une action
|
||||||
MenuDoneActions=Actions terminées
|
MenuDoneActions=Actions terminées
|
||||||
|
ListOfEvents=Liste des évènements Dolibarr
|
||||||
|
|
||||||
|
|||||||
@ -48,9 +48,9 @@ NoRecordedProspects=Aucun prospect enregistr
|
|||||||
StatusActionToDo=À faire
|
StatusActionToDo=À faire
|
||||||
StatusActionDone=Réalisé
|
StatusActionDone=Réalisé
|
||||||
StatusActionInProcess=En cours
|
StatusActionInProcess=En cours
|
||||||
MyActionsAsked=Actions que j'ai demandé
|
MyActionsAsked=Actions que j'ai demandées
|
||||||
MyActionsToDo=Actions que j'ai à faire
|
MyActionsToDo=Actions qui me sont affectées
|
||||||
MyActionsDone=Actions que j'ai faite
|
MyActionsDone=Actions que j'ai faites
|
||||||
TasksHistoryForThisContact=Actions vis à vis de contact
|
TasksHistoryForThisContact=Actions vis à vis de contact
|
||||||
LastProspectDoNotContact=A ne pas contacter
|
LastProspectDoNotContact=A ne pas contacter
|
||||||
LastProspectNeverContacted=Non contactés
|
LastProspectNeverContacted=Non contactés
|
||||||
|
|||||||
@ -218,3 +218,6 @@ insert into llx_c_prospectlevel (code,label,sortorder) values ('PL_HIGH', '
|
|||||||
|
|
||||||
|
|
||||||
alter table llx_societe add column fk_prospectlevel varchar(12) after fournisseur;
|
alter table llx_societe add column fk_prospectlevel varchar(12) after fournisseur;
|
||||||
|
|
||||||
|
update llx_actioncomm set datea = datep where datea is null and percent = 100;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user