Some fix again into event list.

This commit is contained in:
Laurent Destailleur 2014-10-20 13:20:19 +02:00
parent 866b2a7a88
commit e324df2cb9
2 changed files with 7 additions and 6 deletions

View File

@ -414,7 +414,7 @@ $sql.= ' a.percent,';
$sql.= ' a.fk_user_author,a.fk_user_action,a.fk_user_done,';
$sql.= ' a.transparency, a.priority, a.fulldayevent, a.location,';
$sql.= ' a.fk_soc, a.fk_contact,';
$sql.= ' ca.code, ca.libelle as type_label';
$sql.= ' ca.code as type_code, ca.libelle as type_label';
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
if ($usergroup > 0) $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ugu";
@ -484,7 +484,7 @@ if ($resql)
$obj = $db->fetch_object($resql);
// Discard auto action if option is on
if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->code == 'AC_OTH_AUTO')
if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO')
{
$i++;
continue;
@ -495,7 +495,7 @@ if ($resql)
$event->id=$obj->id;
$event->datep=$db->jdate($obj->datep); // datep and datef are GMT date
$event->datef=$db->jdate($obj->datep2);
$event->type_code=$obj->code;
$event->type_code=$obj->type_code;
$event->type_label=$obj->type_label;
$event->libelle=$obj->label;
$event->percentage=$obj->percent;

View File

@ -156,7 +156,7 @@ if ($type) $param.="&type=".$type;
$sql = "SELECT s.nom as societe, s.rowid as socid, s.client,";
$sql.= " a.id, a.datep as dp, a.datep2 as dp2,";
$sql.= " a.fk_contact, a.note, a.label, a.percent as percent,";
$sql.= " c.code as code, c.libelle,";
$sql.= " c.code as type_code, c.libelle as type_label,";
$sql.= " ua.login as loginauthor, ua.rowid as useridauthor,";
$sql.= " ut.login as logintodo, ut.rowid as useridtodo,";
//$sql.= " ud.login as logindone, ud.rowid as useriddone,";
@ -293,7 +293,7 @@ if ($resql)
$obj = $db->fetch_object($resql);
// Discard auto action if option is on
if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->code == 'AC_OTH_AUTO')
if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO')
{
$i++;
continue;
@ -306,7 +306,8 @@ if ($resql)
// Action (type)
print '<td>';
$actionstatic->id=$obj->id;
$actionstatic->type_code=$obj->code;
$actionstatic->type_code=$obj->type_code;
$actionstatic->type_label=$obj->type_label;
$actionstatic->libelle=$obj->label;
print $actionstatic->getNomUrl(1,28);
print '</td>';