Index: societe.class.php =================================================================== RCS file: /sources/dolibarr/dolibarr/htdocs/societe.class.php,v retrieving revision 1.108 diff -u -r1.108 societe.class.php --- societe.class.php 7 Dec 2005 23:36:47 -0000 1.108 +++ societe.class.php 17 Dec 2005 10:39:43 -0000 @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: societe.class.php,v 1.108 2005/12/07 23:36:47 eldy Exp $ - * $Source: /sources/dolibarr/dolibarr/htdocs/societe.class.php,v $ + * $Source: /cvsroot/dolibarr/dolibarr/htdocs/societe.class.php,v $ */ /** @@ -79,6 +79,7 @@ var $stcomm_id; var $statut_commercial; + var $bank_account; /** * \brief Constructeur de la classe @@ -244,7 +245,7 @@ */ function update($id, $user='', $call_trigger=1) { - global $langs; + global $langs ,$conf; dolibarr_syslog("Societe::Update"); @@ -565,6 +566,8 @@ */ function delete($id) { + global $user, $langs, $conf; + dolibarr_syslog("Societe::Delete"); $sqr = 0; @@ -685,7 +688,7 @@ while ($i < $num) { $objp = $this->db->fetch_object(); - $array_push($facimp, $objp->rowid); + array_push($facimp, $objp->rowid); $i++; print $i; } @@ -1477,6 +1480,50 @@ } } + /** + * \brief Construit un objet societe repesentant la societe + * utilisatrice de l'instance de Dolibarr. + * Utilise les constantes MAIN_INFO* + * + * + */ + function getMainCompany() { + global $conf; + + $this->nom = $conf->global->MAIN_INFO_SOCIETE_NOM; + $this->adresse = $conf->global->MAIN_INFO_SOCIETE_ADRESSE; + $this->cp = $conf->global->MAIN_INFO_SOCIETE_CP; + $this->ville = $conf->global->MAIN_INFO_SOCIETE_VILLE; + $this->tel = $conf->global->MAIN_INFO_SOCIETE_TEL; + $this->fax = $conf->global->MAIN_INFO_SOCIETE_FAX; + $this->url = $conf->global->MAIN_INFO_SOCIETE_WEB; + $this->siren = $conf->global->MAIN_INFO_SIREN; + $this->siret = $conf->global->MAIN_INFO_SIRET; + $this->ape = $conf->global->MAIN_INFO_APE; + $this->tva_intra = $conf->global->MAIN_INFO_TVAINTRA; + $this->capital = $conf->global->MAIN_INFO_CAPITAL; + $this->forme_juridique_code = $conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE; + $this->pays_id = $conf->global->MAIN_INFO_SOCIETE_PAYS; + } + + /** + * \brief Construit un objet societe repesentant la societe + * emetrice d'une facture de l'instance de Dolibarr. + * Utilise les constantes FAC_PDF* + * + * + */ + function getBillingCompany() { + global $conf; + // les valeurs par defaut + $this->getMainCompany(); + + $this->adresse = $conf->global->FAC_PDF_ADRESSE; + $this->tel = $conf->global->FAC_PDF_TEL; + $this->fax = $conf->global->FAC_PDF_FAX; + $this->url = $conf->global->FAC_PDF_WWW; + } + } ?>