diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 7633914566e..1243f47505d 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -172,14 +172,14 @@ class CActionComm if ($morefilter) { $sql .= " AND ".$morefilter; } - $sql .= " ORDER BY position"; + $sql .= " ORDER BY type, position, module"; dol_syslog(get_class($this)."::liste_array", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $nump = $this->db->num_rows($resql); if ($nump) { - $idforallfornewmodule = 97; + $idforallfornewmodule = 96; $i = 0; while ($i < $nump) { $obj = $this->db->fetch_object($resql); @@ -277,6 +277,11 @@ class CActionComm $repid[-98] = $langs->trans("ActionAC_AUTO"); $repcode['AC_ALL_AUTO'] = '-- '.$langs->trans("ActionAC_AUTO"); } + if($typecalendar == 'user') { + $label = '   '.$label; + $repid[-97] = $langs->trans("ActionAC_USER"); + $repcode['ActionAC_USER'] = '-- '.$langs->trans("ActionAC_USER"); + } if ($typecalendar == 'module') { //TODO check if possible to push it between system and systemauto if (preg_match('/@/', $obj->module)) { @@ -291,6 +296,7 @@ class CActionComm $repid[$idforallfornewmodule] = $langs->trans("ActionAC_ALL_".strtoupper($module)); $repcode['AC_ALL_'.strtoupper($module)] = '-- '.$langs->trans("Module").' '.ucfirst($module); } + } $repid[$obj->id] = $label; $repcode[$obj->code] = $label; diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index 21d282cd794..a54b17bdc6f 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -67,6 +67,7 @@ ActionAC_OTH=Other ActionAC_OTH_AUTO=Other auto ActionAC_MANUAL=Manually inserted events ActionAC_AUTO=Automatically inserted events +ActionAC_USER=User inserted events ActionAC_OTH_AUTOShort=Other ActionAC_EVENTORGANIZATION=Event organization events Stats=Sales statistics diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index d663185936b..8f744feedc2 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -67,6 +67,7 @@ ActionAC_OTH=Autre ActionAC_OTH_AUTO=Autre auto ActionAC_MANUAL=Événements insérés manuellement ActionAC_AUTO=Événements insérés automatiquement +ActionAC_USER=Événements insérés par l'utilisateur ActionAC_OTH_AUTOShort=Autre ActionAC_EVENTORGANIZATION=Événements d'organisation d'événements Stats=Statistiques de vente