/[dolibarr]/dolibarr/htdocs/admin/dict.php
ViewVC logotype

Diff of /dolibarr/htdocs/admin/dict.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35 by eldy, Mon Aug 29 21:52:35 2005 UTC revision 1.36 by eldy, Wed Sep 7 22:44:01 2005 UTC
# Line 50  $active = 1; Line 50  $active = 1;
50  // Mettre ici tous les caractéristiques des dictionnaires  // Mettre ici tous les caractéristiques des dictionnaires
51    
52  // Ordres d'affichage des dictionnaires (0 pour espace)  // Ordres d'affichage des dictionnaires (0 pour espace)
53  $taborder=array(4,3,2,0,9,0,1,8,0,5,0,6,0,7,0,10);  $taborder=array(4,3,2,0,9,0,1,8,0,5,11, 0,6,0,7,0,10);
54    
55  // Nom des tables des dictionnaires  // Nom des tables des dictionnaires
56  $tabname[1] = MAIN_DB_PREFIX."c_forme_juridique";  $tabname[1] = MAIN_DB_PREFIX."c_forme_juridique";
# Line 63  $tabname[7] = MAIN_DB_PREFIX."c_chargeso Line 63  $tabname[7] = MAIN_DB_PREFIX."c_chargeso
63  $tabname[8] = MAIN_DB_PREFIX."c_typent";  $tabname[8] = MAIN_DB_PREFIX."c_typent";
64  $tabname[9] = MAIN_DB_PREFIX."c_currencies";  $tabname[9] = MAIN_DB_PREFIX."c_currencies";
65  $tabname[10]= MAIN_DB_PREFIX."c_tva";  $tabname[10]= MAIN_DB_PREFIX."c_tva";
66    $tabname[11]= MAIN_DB_PREFIX."c_type_contact";
67    
68  // Libellé des dictionnaires  // Libellé des dictionnaires
69  $tablib[1] = $langs->trans("DictionnaryCompanyJuridicalType");  $tablib[1] = $langs->trans("DictionnaryCompanyJuridicalType");
# Line 75  $tablib[7] = $langs->trans("DictionnaryS Line 76  $tablib[7] = $langs->trans("DictionnaryS
76  $tablib[8] = $langs->trans("DictionnaryCompanyType");  $tablib[8] = $langs->trans("DictionnaryCompanyType");
77  $tablib[9] = $langs->trans("DictionnaryCurrency");  $tablib[9] = $langs->trans("DictionnaryCurrency");
78  $tablib[10]= $langs->trans("DictionnaryVAT");  $tablib[10]= $langs->trans("DictionnaryVAT");
79    $tablib[11]= $langs->trans("DictionnaryTypeContact");
80    
81  // Requete pour extraction des données des dictionnaires  // Requete pour extraction des données des dictionnaires
82  $tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.libelle as pays, f.active FROM llx_c_forme_juridique as f, llx_c_pays as p WHERE f.fk_pays=p.rowid";  $tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid";
83  $tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code , d.nom as libelle, r.nom as region, p.libelle as pays, d.active FROM llx_c_departements as d, llx_c_regions as r, llx_c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1";  $tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code , d.nom as libelle, r.nom as region, p.libelle as pays, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1";
84  $tabsql[3] = "SELECT r.rowid as rowid, code_region as code , nom as libelle, p.libelle as pays, r.active FROM llx_c_regions as r, llx_c_pays as p WHERE r.fk_pays=p.rowid and p.active=1";  $tabsql[3] = "SELECT r.rowid as rowid, code_region as code , nom as libelle, p.libelle as pays, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1";
85  $tabsql[4] = "SELECT rowid   as rowid, code, libelle, active FROM llx_c_pays";  $tabsql[4] = "SELECT rowid   as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_pays";
86  $tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.civilite AS libelle, c.active FROM llx_c_civilite AS c";  $tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.civilite AS libelle, c.active FROM ".MAIN_DB_PREFIX."c_civilite AS c";
87  $tabsql[6] = "SELECT a.id    as rowid, a.code as code, a.libelle AS libelle, a.type, a.active FROM llx_c_actioncomm AS a";  $tabsql[6] = "SELECT a.id    as rowid, a.code as code, a.libelle AS libelle, a.type, a.active FROM ".MAIN_DB_PREFIX."c_actioncomm AS a";
88  $tabsql[7] = "SELECT a.id    as rowid, a.id as code, a.libelle AS libelle, a.deductible, a.active FROM llx_c_chargesociales AS a";  $tabsql[7] = "SELECT a.id    as rowid, a.id as code, a.libelle AS libelle, a.deductible, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a";
89  $tabsql[8] = "SELECT id      as rowid, code, libelle, active FROM llx_c_typent";  $tabsql[8] = "SELECT id      as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent";
90  $tabsql[9] = "SELECT code    as rowid, code, code_iso, label as libelle, active FROM llx_c_currencies";  $tabsql[9] = "SELECT code    as rowid, code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies";
91  $tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, t.recuperableonly, t.note, t.active FROM llx_c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";  $tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
92    $tabsql[11]= "SELECT t.rowid as rowid, code, element, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
93    
94  // Tri par defaut  // Tri par defaut
95  $tabsqlsort[1] ="pays, code ASC";  $tabsqlsort[1] ="pays, code ASC";
# Line 99  $tabsqlsort[7] ="a.libelle ASC"; Line 102  $tabsqlsort[7] ="a.libelle ASC";
102  $tabsqlsort[8] ="libelle ASC";  $tabsqlsort[8] ="libelle ASC";
103  $tabsqlsort[9] ="code ASC";  $tabsqlsort[9] ="code ASC";
104  $tabsqlsort[10]="pays ASC, taux ASC, recuperableonly ASC";  $tabsqlsort[10]="pays ASC, taux ASC, recuperableonly ASC";
105    $tabsqlsort[11]="element ASC, code ASC, libelle ASC";
106    
107  // Nom des champs en resultat de select pour affichage du dictionnaire  // Nom des champs en resultat de select pour affichage du dictionnaire
108  $tabfield[1] = "code,libelle,pays";  $tabfield[1] = "code,libelle,pays";
# Line 111  $tabfield[7] = "libelle,deductible"; Line 115  $tabfield[7] = "libelle,deductible";
115  $tabfield[8] = "code,libelle";  $tabfield[8] = "code,libelle";
116  $tabfield[9] = "code,code_iso,libelle";  $tabfield[9] = "code,code_iso,libelle";
117  $tabfield[10]= "pays,taux,recuperableonly,note";  $tabfield[10]= "pays,taux,recuperableonly,note";
118    $tabfield[11]= "element,code,libelle";
119    
120  // Nom des champs dans la table pour insertion d'un enregistrement  // Nom des champs dans la table pour insertion d'un enregistrement
121  $tabfieldinsert[1] = "code,libelle,fk_pays";  $tabfieldinsert[1] = "code,libelle,fk_pays";
# Line 123  $tabfieldinsert[7] = "libelle,deductible Line 128  $tabfieldinsert[7] = "libelle,deductible
128  $tabfieldinsert[8] = "code,libelle";  $tabfieldinsert[8] = "code,libelle";
129  $tabfieldinsert[9] = "code,code_iso,libelle";  $tabfieldinsert[9] = "code,code_iso,libelle";
130  $tabfieldinsert[10]= "fk_pays,taux,recuperableonly,note";  $tabfieldinsert[10]= "fk_pays,taux,recuperableonly,note";
131    $tabfieldinsert[11]= "element,code,libelle";
132    
133  // Nom du rowid si le champ n'est pas de type autoincrément  // Nom du rowid si le champ n'est pas de type autoincrément
134  $tabrowid[1] = "";  $tabrowid[1] = "";
# Line 135  $tabrowid[7] = "id"; Line 141  $tabrowid[7] = "id";
141  $tabrowid[8] = "id";  $tabrowid[8] = "id";
142  $tabrowid[9] = "code";  $tabrowid[9] = "code";
143  $tabrowid[10]= "";  $tabrowid[10]= "";
144    $tabrowid[11]= "rowid";
145    
146    
147  $msg='';  $msg='';
# Line 362  if ($_GET["id"]) Line 369  if ($_GET["id"])
369                  $html->select_lang(MAIN_LANG_DEFAULT,'lang');                  $html->select_lang(MAIN_LANG_DEFAULT,'lang');
370                  print '</td>';                  print '</td>';
371              }              }
372                // le type de l'element (pour les type de contact).'
373                elseif ($fieldlist[$field] == 'element') {
374                    print '<td>';
375                    $elementList = array();
376                    // un peu crad mais je n'ai pas de meilleure idee.
377                    $elementList["contrat"] = "contrat";
378                    $elementList["projet"] = "projet";
379                    $elementList["propal"] = "propal";
380                    $elementList["facture"] = "facture";
381                    
382                    $html->select_array('element', $elementList);
383                    print '</td>';
384                }
385              elseif ($fieldlist[$field] == 'type') {              elseif ($fieldlist[$field] == 'type') {
386                  print '<td>';                  print '<td>';
387                  print 'user<input type="hidden" name="type" value="user">';                  print 'user<input type="hidden" name="type" value="user">';
# Line 422  if ($_GET["id"]) Line 442  if ($_GET["id"])
442                  $var=!$var;                  $var=!$var;
443    
444                  print "<tr $bc[$var] class=\"value\">";                  print "<tr $bc[$var] class=\"value\">";
   
445                  foreach ($fieldlist as $field => $value) {                  foreach ($fieldlist as $field => $value) {
446                      $valuetoshow=$obj->$fieldlist[$field];                      $valuetoshow=$obj->$fieldlist[$field];
447    
448                      if ($valuetoshow=='all') {                      if ($valuetoshow=='all') {
449                          $valuetoshow=$langs->trans('All');                          $valuetoshow=$langs->trans('All');
450                      }                      }

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26