SD-29 pour appel via cli
This commit is contained in:
parent
ad2c17750e
commit
ea93c983ca
@ -2179,7 +2179,7 @@ function contentieuxlisteMultiple($siren, $nic=0, $values = false,$qualite='')
|
||||
$tabFields = explode(',', $values);
|
||||
}
|
||||
if(in_array('Historique',$tabFields)){
|
||||
$histojoin=' left join greffes_affaires_histo h on h.idAffaire=a.idAffaire ';
|
||||
$histojoin=' left join jo.greffes_affaires_histo h on h.idAffaire=a.idAffaire ';
|
||||
$tabFields[]='DateDecision';
|
||||
$tabFields[]='LibelleDecision';
|
||||
}
|
||||
@ -2195,8 +2195,9 @@ function contentieuxlisteMultiple($siren, $nic=0, $values = false,$qualite='')
|
||||
$select = implode(',',$tabSelect);
|
||||
$conn = Zend_Registry::get('doctrine');
|
||||
$sql='select '.$select .'
|
||||
from (greffes_affaires_siren s inner join greffes_affaires a using(id)) '.$histojoin.' where
|
||||
from (jo.greffes_affaires_siren s inner join jo.greffes_affaires a using(id)) '.$histojoin.' where
|
||||
entSiren=:siren'.$qualite;
|
||||
//echo $sql;die;
|
||||
/*$sql='select dateEnrolement as dateAffaire,typeAffaireEnum as categorieAffaire,codNatureDemande as typeAffaire,natureDemande,nomDemandeur,
|
||||
nomDefendeur,etatAffaire as statutAffaire,codeGreffe,nomGreffe,representants,rep0nom as nomsRepresentants
|
||||
from greffes_affaires_siren s inner join greffes_affaires a using(id) where entSiren=:siren';*/
|
||||
@ -2209,16 +2210,13 @@ function contentieuxlisteMultiple($siren, $nic=0, $values = false,$qualite='')
|
||||
}
|
||||
$tabData=$stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
//if(false){
|
||||
if(in_array('StatusLabel',$tabFields) || in_array('CategoryLabel',$tabFields)){
|
||||
if(in_array('StatusLabel',$tabFields) || in_array('CategoryLabel',$tabFields) || in_array('Parties',$tabFields) || in_array('Representants',$tabFields)){
|
||||
$status = include APPLICATION_PATH . '/../library/Metier/Ctx/AffaireStatus.php';
|
||||
$categories = include APPLICATION_PATH . '/../library/Metier/Table/AffairesTypes.php';
|
||||
foreach($tabData as $k => $row){
|
||||
echo $k.'--->'.$siren;
|
||||
if(isset($row['StatusLabel']) && isset($status[$row['StatusLabel']])){$tabData[$k]['StatusLabel']=$status[$row['StatusLabel']];}
|
||||
if(isset($row['CategoryLabel']) && isset($categories[$row['CategoryLabel']])){$tabData[$k]['CategoryLabel']=$categories[$row['CategoryLabel']];}
|
||||
}
|
||||
}
|
||||
if(in_array('Parties',$tabFields) || in_array('Representants',$tabFields)){
|
||||
foreach($tabData as $k => $row){
|
||||
if(isset($row['Parties']) && !empty($row['Parties'])){
|
||||
$text='';
|
||||
$parties=json_decode($row['Parties']);
|
||||
|
Loading…
Reference in New Issue
Block a user