]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 19 Jan 2011 11:20:19 +0000 (11:20 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 19 Jan 2011 11:20:19 +0000 (11:20 +0000)
inc/commons/DAO/class.common.dao.entreprise.php
inc/commons/class.common.page.php
inc/ws/Controlleur/class.ws.ajax.php
inc/ws/Controlleur/class.ws.url.php

index d43d12f7830116d8aaaa7c2f73f5c01fc1653bbd..481b455eafdbf5940f9f8c30e2e70afe5c5e28cf 100644 (file)
@@ -61,7 +61,6 @@ class commonDAOEntreprise extends commonDAO {
 \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
@@ -111,7 +110,7 @@ class commonDAOEntreprise extends commonDAO {
        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
@@ -125,8 +124,12 @@ class commonDAOEntreprise extends commonDAO {
                $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
index a48e2dba62945bcc00115b3be6085893c120137b..1ea161cbf9d582fbe4757ea9a6ae8881047da4cc 100644 (file)
@@ -75,12 +75,13 @@ class commonPage {
                        }\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
index 554fc43abcaf51ca9e38ee904e5acfa974ce5163..d8ebbce80a15ae5cefa4378f5d4697d2eff08243 100644 (file)
@@ -44,7 +44,6 @@ class wsAjax extends cubeAjax {
                        $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
index 4caa4767a3cf1da43e56781856bccde4d8c7b463..e1e1984e67e464d028f6005a9a8d46cbe567c20d 100644 (file)
@@ -508,8 +508,10 @@ html{height:100%}' . "\n";
                $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