\r
public function getListe($orderby = null, $sens = null, $limit = null, $limitedToUserRights = false)\r
{\r
-\r
if (!is_null($this->q)) {\r
$daoClients = new commonDAOClient($this->con);\r
$where = '';\r
protected function limitToUserRights($user)\r
{\r
if ($user) {\r
- return ' AND entreprise_id IN (SELECT entreprise FROM utilisateurs WHERE utilisateur_id IN(' . $user->ws_rights . ') AND utilisateur_id!=\''.$this->con->escape($user->utilisateur_id).'\') ';\r
+ return ' AND entreprise_id IN (SELECT entreprise FROM utilisateurs WHERE utilisateur_id IN(' . $user->ws_rights . ') AND utilisateur_id!=\'' . $this->con->escape($user->utilisateur_id) . '\') ';\r
}\r
return '';\r
}\r
$c->code_postal = $data['code_postal'];\r
$c->ville = $data['ville'];\r
$c->pays = $data['pays'];\r
- $c->tva_intra = $data['tva_intra'];\r
- $c->adresse_facturation = $data['adresse_facturation'];\r
+ if (isset($data['tva_intra'])) {\r
+ $c->tva_intra = $data['tva_intra'];\r
+ }\r
+ if (isset($data['adresse_facturation'])) {\r
+ $c->adresse_facturation = $data['adresse_facturation'];\r
+ }\r
if (isset($data['ws_admin'])) {\r
$c->ws_admin = $data['ws_admin'];\r
}\r
}\r
}\r
\r
- fb($args);\r
+ $supp = array('stats' => 'publication');\r
+\r
$res = '<div id="nav">';\r
foreach($onglets as $titre => $url) {\r
// Si cet onglet correspond à la page active, on le place actif\r
- $active = ($args[0] == $url)?' class="active"':'';\r
- $res .= '<a href="' . SITE_PATH . $url . '"'.$active.'>' . cubeMedia::cssRollover($core->typo->Onglet($titre, '', false)) . '</a>';\r
+ $active = ($args[0] == $url || (isset($supp[$args[0]]) && $supp[$args[0]] == $url))?' class="active"':'';\r
+ $res .= '<a href="' . SITE_PATH . $url . '"' . $active . '>' . cubeMedia::cssRollover($core->typo->Onglet($titre, '', false)) . '</a>';\r
}\r
$res .= '</div>';\r
return $res;\r
$data['ville'] = $entreprise->ville;\r
$data['pays'] = $entreprise->pays;\r
$data['grade'] = 0;\r
- $data['adresse_facturation'] = $entreprise->adresse_facturation;\r
$daoClient = new commonDAOClient($core->con);\r
try {\r
$daoClient->sauve($data);\r
$res .= '<tr><td>' . __('Code postal') . '</td><td>' . form::field('code_postal', 10, 20, $client->code_postal) . '</td></tr>';\r
$res .= '<tr><td>' . __('Ville') . '</td><td>' . form::field('ville', 30, 128, $client->ville) . '</td></tr>';\r
$res .= '<tr><td>' . __('Pays') . '</td><td>' . form::combo('pays', cubeCountry::getList(), $client->pays) . '</td></tr>';\r
- $res .= '<tr><td>' . __('Adresse de facturation') . '</td><td>' . form::textarea('adresse_facturation', 40, 3, $client->adresse_facturation) . '</td></tr>';\r
- $res .= '<tr><td>' . __('Numéro de TVA intracommunautaire') . '</td><td>' . form::field('tva_intra', 15, 13, $client->tva_intra) . '</td></tr>';\r
+ if (wsDroits::admin(false)) {\r
+ $res .= '<tr><td>' . __('Adresse de facturation') . '</td><td>' . form::textarea('adresse_facturation', 40, 3, $client->adresse_facturation) . '</td></tr>';\r
+ $res .= '<tr><td>' . __('Numéro de TVA intracommunautaire') . '</td><td>' . form::field('tva_intra', 15, 13, $client->tva_intra) . '</td></tr>';\r
+ }\r
// Bloc Fluidbook Workshop\r
if (wsDroits::admin(false)) {\r
$res .= '<tr class="light"><th colspan="2" class="light"><strong>' . __('Fluidbook Workshop') . '</strong></th></tr>';\r