getValueLabelJuridique

This commit is contained in:
Michael RICOIS 2012-05-23 10:03:36 +00:00
parent 389509d700
commit 991423a077

View File

@ -974,7 +974,15 @@ class Scores_Fields
public function getValueLabelJuridique($values)
{
$values = array_map(function($value){ return '"'.$value.'"'; }, $values);
$out = array();
$fjM = new Application_Model_FormeJuridique();
$sql = $fjM->select()->from($fjM, array('fjLibelle'))->where('fjCode IN ('.join(',',$values).')');
$result = $fjM->fetchAll($sql)->toArray();
foreach ( $result as $elem ) {
$out[] = $elem['fjLibelle'];
}
return $out;
}