Utilisation du premier tribunal disponible dans la liste des compétences

This commit is contained in:
Michael RICOIS 2010-04-13 16:02:43 +00:00
parent 28e50a5ef1
commit fddb19d880

View File

@ -81,14 +81,18 @@ $client = new SoapClient(null, array(
$O = $client->getIdentite($siren, '', false);
$etab = $O['result'];
$tribunalCode = $etab['TribunalCode'];
$codeCommune = $etab['codeCommune'];
$dept = $etab['Dept'];
$siret = $etab['Siret'];
$numRC = $etab['NumRC'];
$tribunalLib = $etab['TribunalLib'];
//Adresse du tribunal de commerce
$O = $client->getListeCompetences($siret, 'tri', $dept.$codeCommune);
$competences = $O['result'];
$competence = $competences[0];
$tribunalCode = $competence['Code'];
$tribunalLib = $comptence['Nom'];
if (preg_match('/(A|B|C|D)/i', $numRC))
{
$libTrib = ' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$tribunalLib);
@ -107,17 +111,7 @@ $pdfInfo->adresse[] = $etab['Adresse'];
$pdfInfo->adresse[] = $etab['Adresse2'];
$pdfInfo->adresse[] = $etab['CP'].' '.$etab['Ville'];
//Adresse du tribunal de commerce
$O = $client->getListeCompetences($siret, 'tri', $dept.$codeCommune);
$competences = $O['result'];
foreach($competences as $competence)
{
if($competence['Code']==$tribunalCode)
{
$pdfInfo->tribunal = $competence;
break;
}
}
$pdfInfo->tribunal = $competence;
//Prix
$q = Doctrine_Query::create()