Gestion du RIB

This commit is contained in:
Rodolphe Quiedeville 2004-09-13 08:17:48 +00:00
parent 9c46583596
commit 5b41c06802

View File

@ -256,7 +256,6 @@ class Societe {
if ($this->client == 1) if ($this->client == 1)
{ {
$this->nom_url = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id.'">'.$obj->nom.'</a>'; $this->nom_url = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id.'">'.$obj->nom.'</a>';
} }
elseif($this->client == 2) elseif($this->client == 2)
@ -272,20 +271,23 @@ class Societe {
$this->note = $obj->note; $this->note = $obj->note;
return 1; $result = 1;
} }
else else
{ {
print "Aucun enregistrement trouvé<br>$sql"; print "Aucun enregistrement trouvé<br>$sql";
return -2; $result = -2;
} }
$this->db->free(); $this->db->free();
} }
else else
{ {
dolibarr_print_error($this->db); dolibarr_print_error($this->db);
$result = -3;
} }
return $result;
} }
/** /**
@ -651,29 +653,43 @@ class Societe {
* \return array tableau des formes juridiques * \return array tableau des formes juridiques
*/ */
function forme_juridique_array() function forme_juridique_array()
{ {
$fj = array(); $fj = array();
/* /*
* Lignes * Lignes
*/ */
$sql = "SELECT code, libelle"; $sql = "SELECT code, libelle";
$sql .= " FROM ".MAIN_DB_PREFIX."c_forme_juridique"; $sql .= " FROM ".MAIN_DB_PREFIX."c_forme_juridique";
$sql .= " ORDER BY code ASC"; $sql .= " ORDER BY code ASC";
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
$num = $this->db->num_rows(); $num = $this->db->num_rows();
$i = 0; $i = 0;
while ($i < $num) while ($i < $num)
{ {
$objp = $this->db->fetch_object($i); $objp = $this->db->fetch_object($i);
$fj[$objp->code] = $objp->libelle; $fj[$objp->code] = $objp->libelle;
$i++; $i++;
} }
$this->db->free(); $this->db->free();
} }
return $fj; return $fj;
} }
function display_rib()
{
require_once DOL_DOCUMENT_ROOT . "/companybankaccount.class.php";
$bac = new CompanyBankAccount($this->db, $this->id);
$bac->fetch();
$rib = $bac->code_banque." ".$bac->code_guichet." ".$bac->number." ".$bac->cle_rib;
return $rib;
}
} }
?> ?>