Utilisation du premier tribunal disponible dans la liste des compétences
This commit is contained in:
parent
28e50a5ef1
commit
fddb19d880
@ -81,14 +81,18 @@ $client = new SoapClient(null, array(
|
|||||||
|
|
||||||
$O = $client->getIdentite($siren, '', false);
|
$O = $client->getIdentite($siren, '', false);
|
||||||
$etab = $O['result'];
|
$etab = $O['result'];
|
||||||
|
|
||||||
$tribunalCode = $etab['TribunalCode'];
|
|
||||||
$codeCommune = $etab['codeCommune'];
|
$codeCommune = $etab['codeCommune'];
|
||||||
$dept = $etab['Dept'];
|
$dept = $etab['Dept'];
|
||||||
$siret = $etab['Siret'];
|
$siret = $etab['Siret'];
|
||||||
|
|
||||||
$numRC = $etab['NumRC'];
|
$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))
|
if (preg_match('/(A|B|C|D)/i', $numRC))
|
||||||
{
|
{
|
||||||
$libTrib = ' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$tribunalLib);
|
$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['Adresse2'];
|
||||||
$pdfInfo->adresse[] = $etab['CP'].' '.$etab['Ville'];
|
$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;
|
$pdfInfo->tribunal = $competence;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Prix
|
//Prix
|
||||||
$q = Doctrine_Query::create()
|
$q = Doctrine_Query::create()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user