SD-29 Little fix
This commit is contained in:
parent
ab8f7800e3
commit
3178234a0a
@ -2178,10 +2178,10 @@ function contentieuxlisteMultiple($siren, $nic=0, $values = false,$qualite='')
|
||||
}else{
|
||||
$tabFields = explode(',', $values);
|
||||
}
|
||||
if(in_array('historique',$tabFields)){
|
||||
if(in_array('Historique',$tabFields)){
|
||||
$histojoin=' left join greffes_affaires_histo h on h.idAffaire=a.idAffaire ';
|
||||
$tabFields[]='dateDecision';
|
||||
$tabFields[]='libelleDecision';
|
||||
$tabFields[]='DateDecision';
|
||||
$tabFields[]='LibelleDecision';
|
||||
}
|
||||
|
||||
foreach($tabFields as $field){
|
||||
@ -2209,19 +2209,19 @@ 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)){
|
||||
$status = include APPLICATION_PATH . '/../library/Metier/Ctx/AffaireStatus.php';
|
||||
$categories = include APPLICATION_PATH . '/../library/Metier/Table/AffairesTypes.php';
|
||||
foreach($tabData as $k => $row){
|
||||
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(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)){
|
||||
if(in_array('Parties',$tabFields) || in_array('Representants',$tabFields)){
|
||||
foreach($tabData as $k => $row){
|
||||
if(isset($row['parties']) && !empty($row['parties'])){
|
||||
if(isset($row['Parties']) && !empty($row['Parties'])){
|
||||
$text='';
|
||||
$parties=json_decode($row['parties']);
|
||||
$parties=json_decode($row['Parties']);
|
||||
foreach($parties as $p){
|
||||
$text.=(isset($p->nomPartie)?$p->nomPartie:'').'('.(isset($p->entreprise->siren)?$p->entreprise->siren:'').')';
|
||||
if(isset($p->representants) && !empty($p->representants)){
|
||||
@ -2232,17 +2232,17 @@ function contentieuxlisteMultiple($siren, $nic=0, $values = false,$qualite='')
|
||||
$text.=' ';
|
||||
}
|
||||
//echo $tabData[$k]['parties'];echo $text;
|
||||
$tabData[$k]['parties']=$text;
|
||||
$tabData[$k]['Parties']=$text;
|
||||
}
|
||||
if(isset($row['representants']) && !empty($row['representants'])){
|
||||
$parties=(array)json_decode($row['representants']);
|
||||
if(isset($row['Representants']) && !empty($row['Representants'])){
|
||||
$parties=(array)json_decode($row['Representants']);
|
||||
if(is_array($parties)){
|
||||
foreach($parties as $p){
|
||||
$text=isset($p->nom)?$p->nom.' - ':'';
|
||||
}}else{
|
||||
$text=isset($parties['nom'])?$parties['nom']:$row['representants'];
|
||||
$text=isset($parties['nom'])?$parties['nom']:$row['Representants'];
|
||||
}
|
||||
$tabData[$k]['representants']=$text;
|
||||
$tabData[$k]['Representants']=$text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user