diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 9a7839fd1c3..d6833f628b7 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -528,75 +528,6 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) else dol_print_error($db); } - -// Last trips and expenses -if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) -{ - include_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; - - $langs->load("boxes"); - - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.fk_statut, d.rowid, d.dated as date, d.tms as dm, d.km"; - $sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE u.rowid = d.fk_user"; - $sql.= " AND d.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND d.fk_soc = ".$socid; - $sql.= $db->order("d.tms","DESC"); - $sql.= $db->plimit($max, 0); - - $result = $db->query($sql); - if ($result) - { - $var=false; - $num = $db->num_rows($result); - - $i = 0; - - print '
| '.$langs->trans("BoxTitleLastModifiedExpenses",$max).' | '; - print ''.$langs->trans("FeesKilometersOrAmout").' | '; - print ''.$langs->trans("DateModificationShort").' | '; - print ''; - print ' | |
| '.$deplacementstatic->getNomUrl(1).' | '; - print ''.$userstatic->getNomUrl(1).' | '; - print ''.$objp->km.' | '; - print ''.dol_print_date($db->jdate($objp->dm),'day').' | '; - print ''.$deplacementstatic->LibStatut($objp->fk_statut,3).' | '; - print '
| '.$langs->trans("None").' | ||||