Gestion du typent

This commit is contained in:
Rodolphe Quiedeville 2005-04-13 18:25:57 +00:00
parent 1ea10c1711
commit 14fdd2fc6e
2 changed files with 11 additions and 5 deletions

View File

@ -511,6 +511,9 @@ else
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$soc->forme_juridique.'</td></tr>'; print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$soc->forme_juridique.'</td></tr>';
$arr = $soc->typent_array($soc->typent_id);
$soc->typent= $arr[$soc->typent_id];
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$soc->typent.'</td><td>'.$langs->trans("Staff").'</td><td>'.$soc->effectif.'</td></tr>'; print '<tr><td>'.$langs->trans("Type").'</td><td>'.$soc->typent.'</td><td>'.$langs->trans("Staff").'</td><td>'.$soc->effectif.'</td></tr>';
print '<tr><td><a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'">'.img_edit() ."</a>&nbsp;"; print '<tr><td><a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'">'.img_edit() ."</a>&nbsp;";

View File

@ -317,6 +317,9 @@ class Societe {
if ($this->effectif_id) if ($this->effectif_id)
{ $sql .= ",fk_effectif = '" . $this->effectif_id ."'"; } { $sql .= ",fk_effectif = '" . $this->effectif_id ."'"; }
if ($this->typent_id)
{ $sql .= ",fk_typent = '" . $this->typent_id ."'"; }
if ($this->forme_juridique_code) if ($this->forme_juridique_code)
{ {
$sql .= ",fk_forme_juridique = '".$this->forme_juridique_code."'"; $sql .= ",fk_forme_juridique = '".$this->forme_juridique_code."'";
@ -389,6 +392,7 @@ class Societe {
$sql .= ",". $this->db->pdate("s.tms")." as date_update"; $sql .= ",". $this->db->pdate("s.tms")." as date_update";
$sql .= ", s.tel, s.fax, s.url,s.cp,s.ville, s.note, s.siren, client, fournisseur"; $sql .= ", s.tel, s.fax, s.url,s.cp,s.ville, s.note, s.siren, client, fournisseur";
$sql .= ", s.siret, s.capital, s.ape, s.tva_intra, s.rubrique, s.fk_effectif"; $sql .= ", s.siret, s.capital, s.ape, s.tva_intra, s.rubrique, s.fk_effectif";
$sql .= ", s.fk_typent";
$sql .= ", e.libelle as effectif, e.id as effectif_id"; $sql .= ", e.libelle as effectif, e.id as effectif_id";
$sql .= ", s.fk_forme_juridique as forme_juridique_code, fj.libelle as forme_juridique"; $sql .= ", s.fk_forme_juridique as forme_juridique_code, fj.libelle as forme_juridique";
$sql .= ", s.code_client, s.code_compta, s.parent"; $sql .= ", s.code_client, s.code_compta, s.parent";
@ -457,7 +461,7 @@ class Societe {
$this->tva_intra = $obj->tva_intra; $this->tva_intra = $obj->tva_intra;
$this->tva_intra_code = substr($obj->tva_intra,0,2); $this->tva_intra_code = substr($obj->tva_intra,0,2);
$this->tva_intra_num = substr($obj->tva_intra,2); $this->tva_intra_num = substr($obj->tva_intra,2);
$this->typent_id = $obj->fk_typent;
$this->effectif_id = $obj->effectif_id; $this->effectif_id = $obj->effectif_id;
$this->effectif = $obj->effectif_id?$obj->effectif:''; $this->effectif = $obj->effectif_id?$obj->effectif:'';
@ -485,7 +489,6 @@ class Societe {
} }
$this->rubrique = $obj->rubrique; $this->rubrique = $obj->rubrique;
$this->note = $obj->note; $this->note = $obj->note;
$result = 1; $result = 1;