MRncs : getLibelleFJ

This commit is contained in:
Michael RICOIS 2017-01-12 12:38:54 +01:00
parent dab30b5827
commit d69bceeb3b

View File

@ -300,31 +300,38 @@ class Metier_Partenaires_MRncs
/**
* Libellé des FJ
* @param unknown $code_forme_juridique
* @param number $code_forme_juridique
* @return string
*/
private function getLibelleFJ($code_forme_juridique)
{
$fj = $code_forme_juridique*1;
$label = 'En instance de chiffrement';
if ($fj > 0 && $fj < 10000) {
$tmp = $this->iDb->select('jo.tabFJur', 'libelle AS LibFJ', "code=$fj");
return @$tmp[0][0];
$stmt = $this->conn->executeQuery("SELECT libelle AS LibFJ FROM jo.tabFJur WHERE code=$fj");
if ($stmt->rowCount() > 0) {
$label = $stmt->fetchColumn('LibFJ');
}
}
return 'En instance de chiffrement';
return $label;
}
/**
* Libellé des NAF
* @param unknown $codeNaf
* @return Ambigous <>
* @param string $codeNaf
* @return string
*/
private function getLibelleNaf($codeNaf)
{
$ret = $this->iDb->query("SELECT libNaf700 AS LibNaf FROM jo.tabNaf4 WHERE codNaf700='$codeNaf'
$stmt = $this->conn->executeQuery("SELECT libNaf700 AS LibNaf FROM jo.tabNaf4 WHERE codNaf700='$codeNaf'
UNION SELECT libNaf5 AS LibNaf FROM jo.tabNaf5 WHERE codNaf5='$codeNaf'");
$res = $this->iDb->fetch(MYSQL_ASSOC);
return $res['LibNaf'];
$label = "Inconnu";
if ($stmt->rowCount() > 0) {
$label = $stmt->fetchColumn('LibNaf');
}
return $label;
}
/**
@ -334,7 +341,7 @@ class Metier_Partenaires_MRncs
*/
public function getLibTribunal($numTribunal)
{
if ($numTribunal*1>0) {
if ($numTribunal*1 > 0) {
return $this->tabTribunaux[$numTribunal*1]['Nom'];
}
@ -348,7 +355,7 @@ class Metier_Partenaires_MRncs
*/
public function getCodeBodaccTribunal($numTribunal)
{
if ($numTribunal*1>0) {
if ($numTribunal*1 > 0) {
return $this->tabTribunaux[$numTribunal*1]['Code'];
}
@ -362,7 +369,7 @@ class Metier_Partenaires_MRncs
*/
public function getIdTribunal($numTribunal)
{
if ($numTribunal*1>0) {
if ($numTribunal*1 > 0) {
return $this->tabTribunaux[$numTribunal*1]['Id'];
}