diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 73239e5edbe..ab0f6875279 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * * 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 @@ -297,11 +297,11 @@ show_array_last_actions_done($max); */ if ($user->rights->societe->lire) { - $sql = "SELECT s.rowid,s.nom,".$db->pdate("datec")." as datec"; + $sql = "SELECT s.rowid,s.nom,s.client,".$db->pdate("datec")." as datec"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE s.client = 1"; + $sql.= " WHERE s.client in (1,2)"; if ($socid) { $sql .= " AND s.rowid = $socid"; @@ -323,7 +323,7 @@ if ($user->rights->societe->lire) print ''; print ''; - print ''; + print ''; $i = 0; $var=false; @@ -331,7 +331,13 @@ if ($user->rights->societe->lire) { $objp = $db->fetch_object($resql); print ""; - print ""; + print ""; + if ($objp->client == 2) print "rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom.""; + print '"; print '"; print ''; $i++; diff --git a/htdocs/includes/menus/barre_left/auguria_backoffice.php b/htdocs/includes/menus/barre_left/auguria_backoffice.php index e682e6cefff..d2986beea1f 100644 --- a/htdocs/includes/menus/barre_left/auguria_backoffice.php +++ b/htdocs/includes/menus/barre_left/auguria_backoffice.php @@ -145,7 +145,7 @@ class MenuLeft { if (! sizeof($this->menu_array)) { print '
'."\n"; - print $langs->trans("NoPermission"); + print $langs->trans("NoMenu"); print '
'; } else @@ -158,53 +158,55 @@ class MenuLeft { { if (($alt%2==0)) { - print '
'.$langs->trans("BoxTitleLastCustomers",$max).'
'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).'
rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom.""; + if ($objp->client == 1) print "rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom."'; + if ($objp->client == 1) print $langs->trans("Customer"); + if ($objp->client == 2) print $langs->trans("Prospect"); + print "'.dolibarr_print_date($objp->datec,'day')."