From 8ae1ca21fcaa705bb93b46a8a3752c4b0a1df71a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Mar 2005 14:09:34 +0000 Subject: [PATCH] =?UTF-8?q?Trad:=20Traduction=20des=20types=20de=20soci=E9?= =?UTF-8?q?t=E9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/langs/en_US/companies.lang | 7 +++- htdocs/langs/fr_FR/companies.lang | 7 +++- htdocs/societe.class.php | 63 +++++++++++++++++-------------- 3 files changed, 46 insertions(+), 31 deletions(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index b01c822ba0d..b9c69069eec 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -65,4 +65,9 @@ EditCompany=Edit company ThisUserIsNot=This user is not a prospect, customer nor supplier VATIntraCheckableOnEUSite=Intracomunnautary VAT can be checked on European commision site NorProspectNorCustomer=Nor prospect, nor customer -Staff=Staff \ No newline at end of file +Staff=Staff +TE_STARTUP=Startup +TE_GROUP=Large company +TE_MEDIUM=Small or medium company +TE_ADMIN=Governemental +TE_OTHER=Other \ No newline at end of file diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 7e66e3272b5..99c6b881dd4 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -65,4 +65,9 @@ EditCompany=Edition soci ThisUserIsNot=Cet utilisateur n'est pas un prospect, client ni fournisseur VATIntraCheckableOnEUSite=Numéro TVA intra communautaire vérifiable sur le site de la commission européenne NorProspectNorCustomer=Ni client, ni prospect -Staff=Effectifs \ No newline at end of file +Staff=Effectifs +TE_STARTUP=Startup +TE_GROUP=Grande société +TE_MEDIUM=PME/PMI +TE_ADMIN=Administration +TE_OTHER=Autre \ No newline at end of file diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 3049cc7d29b..d80596408fc 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -966,35 +966,40 @@ class Societe { } - /** - * \brief Renvoie la liste des types de parties - * \return array tableau des types - */ - - function typent_array() - { - $effs = array(); - /* - * Lignes - */ - $sql = "SELECT id, libelle"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_typent"; - $sql .= " ORDER BY id ASC"; - if ($this->db->query($sql)) - { - $num = $this->db->num_rows(); - $i = 0; - - while ($i < $num) - { - $objp = $this->db->fetch_object(); - $effs[$objp->id] = $objp->libelle; - $i++; - } - $this->db->free(); - } - return $effs; - } + /** + * \brief Renvoie la liste des types actifs de sociétés + * \return array tableau des types + */ + function typent_array() + { + global $langs; + + $effs = array(); + + $sql = "SELECT id, code, libelle"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_typent"; + $sql .= " WHERE active = 1"; + $sql .= " ORDER by id"; + $result=$this->db->query($sql); + if ($result) + { + $num = $this->db->num_rows($result); + $i = 0; + + while ($i < $num) + { + $objp = $this->db->fetch_object($result); + if ($langs->trans($objp->code) != $objp->code) + $effs[$objp->id] = $langs->trans($objp->code); + else + $effs[$objp->id] = $objp->libelle; + $i++; + } + $this->db->free($result); + } + + return $effs; + } /**