188 lines
4.8 KiB
PHP
188 lines
4.8 KiB
PHP
<?php
|
|
|
|
//Contient les Numéro d'identifiant
|
|
function dIdentifiant($tab){
|
|
$tab = $tab['Company']['Subject'][0]['CompanyId'];
|
|
print '<table>';
|
|
foreach($tab as $identifiant => $value){
|
|
printRow($identifiant, $value);
|
|
}
|
|
print '</table>';
|
|
}
|
|
|
|
//Contient l'identité de l'entreprise
|
|
function dIdentite($tab){
|
|
print '<table>';
|
|
//Affichage raison sociale
|
|
if($tab['Company']['Subject'][0]['Name']){ printRow('Raison Sociale', $tab['Company']['Subject'][0]['Name']); }
|
|
//Affichage autres noms
|
|
if($tab['Name']['Trade']){ printRow('Enseigne', $tab['Name']['Trade']); }
|
|
//Affichage Forme légale
|
|
foreach($tab['LegalForm'] as $name => $forme){
|
|
switch($name){
|
|
case "Current" :
|
|
printRow('Forme légale', $forme);
|
|
break;
|
|
case "Previous" :
|
|
printRow('Forme légale précédente', $forme);
|
|
break;
|
|
}
|
|
}
|
|
//Afficage date
|
|
if($tab['Company']['Subject'][0]['Date']['Age_of_Company']){ printRow('Date de Création', $tab['Company']['Subject'][0]['Date']['Age_of_Company']); }
|
|
|
|
//Affichage adresses
|
|
$typeAddress = array('Registered', 'Trading', 'Previous Trading');
|
|
$oldAddress = '';
|
|
foreach($typeAddress as $address){
|
|
$currentAddress = $tab['Address'][$address]['EntireAddress'];
|
|
if($oldAddress != $currentAddress && $tab['Address'][$address]['EntireAddress']){
|
|
switch($address){
|
|
case "Registered" :
|
|
printRow('Adresse', $currentAddress);
|
|
break;
|
|
case "Trading" :
|
|
printRow('Adresse commerciale', $currentAddress);
|
|
break;
|
|
case "Previous Trading" :
|
|
printRow('Adresse commerciale précédente', $currentAddress);
|
|
break;
|
|
}
|
|
}
|
|
$oldAddress = $currentAddress;
|
|
}
|
|
//Affichage Communication
|
|
foreach($tab['Communication'] as $name => $value){
|
|
switch($name){
|
|
case "Telephone" :
|
|
printRow('Téléphone', $value);
|
|
break;
|
|
case "Fax" :
|
|
printRow('Fax', $value);
|
|
break;
|
|
}
|
|
}
|
|
print '</table>';
|
|
}
|
|
|
|
//Contient l'activité
|
|
function dActivite($tab){
|
|
print '<table>';
|
|
//Code NACE
|
|
if($tab['Taxonomy']){
|
|
foreach($tab['Taxonomy'] as $item){
|
|
if($item['Type'] == 'Nace'){
|
|
$activite = $item['Code'].' - '.$item['Value'].'<br/>';
|
|
}
|
|
}
|
|
if($activite) printRow('Activité', $activite);
|
|
}
|
|
if($tab['Text']['Activities']){
|
|
foreach($tab['Text']['Activities'] as $item){
|
|
$text = $item.'<br/>';
|
|
}
|
|
printRow('', '<b><u>Informations complémentaires:</u></b><br/>'.$text);
|
|
}
|
|
//Effectif
|
|
if($tab['Employees']['Staff_Employed']){
|
|
printRow('Effectif', $tab['Employees']['Staff_Employed']);
|
|
}
|
|
//Capital
|
|
if($tab['ShareCapitalSummary']['ShareCapital']){
|
|
foreach($tab['ShareCapitalSummary']['ShareCapital'] as $item){
|
|
foreach($item['Amount'] as $name => $value){
|
|
printRow($name, $value);
|
|
}
|
|
}
|
|
}
|
|
//Chiffre d'affaire
|
|
|
|
|
|
//Principaux dirigeants
|
|
if($tab['DirectorsDetail']){
|
|
$text = '';
|
|
foreach($tab['DirectorsDetail'] as $item){
|
|
$text.= formatName($item['Name']);
|
|
$text.= ' ('.$item['Type'].')';
|
|
$text.= '<br/>';
|
|
}
|
|
printRow('Principaux dirigeants', $text);
|
|
}
|
|
print '</table>';
|
|
}
|
|
|
|
function dCredit($tab){
|
|
print '<table>';
|
|
if($tab['CreditRating']){
|
|
if($tab['CreditRating']['Credit_Score']){
|
|
printRow('Score actuel', $tab['CreditRating']['Credit_Score']['Value']);
|
|
}
|
|
if($tab['CreditRating']['Previous_Credit_Score']){
|
|
printRow('Score précédent', $tab['CreditRating']['Previous_Credit_Score']['Value']);
|
|
}
|
|
if($tab['CreditRating']['Credit_Score']['Text']['Credit_Score_Description']){
|
|
printRow('', '<b><u>Description :</u></b><br/>'.$tab['CreditRating']['Credit_Score']['Text']['Credit_Score_Description']);
|
|
}
|
|
if($tab['CreditRating']['Credit_Score']['Text']['Credit_Score_Explanation']){
|
|
printRow('', '<b><u>Explication :</u></b><br/>'.$tab['CreditRating']['Credit_Score']['Text']['Credit_Score_Explanation']);
|
|
}
|
|
if($tab['CreditRating']['Maximum_Credit_Guide']){
|
|
$value = $tab['CreditRating']['Maximum_Credit_Guide']['Value'];
|
|
$value.= ' '.$tab['CreditRating']['Maximum_Credit_Guide']['Currency'];
|
|
printRow('Credit maximum (Guide)', $value);
|
|
}
|
|
}
|
|
print '</table>';
|
|
}
|
|
|
|
function dResume($tab){
|
|
print '<table>';
|
|
/*
|
|
Trade Morality
|
|
Payments
|
|
Leverage Percentage
|
|
Quick Ratio Percentage
|
|
Issued Capital
|
|
Nominal Capital
|
|
Net Sales
|
|
Sales
|
|
Net Income
|
|
Total Equity
|
|
Total Fixed Assets
|
|
Stocks
|
|
Summary
|
|
*/
|
|
if($tab['FinancialSummary']['Text']){
|
|
foreach($tab['FinancialSummary']['Text'] as $name => $value){
|
|
printRow($name, $value);
|
|
}
|
|
}
|
|
if($tab['FinancialSummary']['Date']){
|
|
foreach($tab['FinancialSummary']['Date'] as $name => $value){
|
|
printRow($name, $value);
|
|
}
|
|
}
|
|
print '</table>';
|
|
}
|
|
|
|
function formatName($name){
|
|
if(is_array($name)){
|
|
if($name['Family']){ $text.= $name['Family']; }
|
|
if($name['Christian']){ $text.= ' '.$name['Christian']; }
|
|
}else{
|
|
$text = $name;
|
|
}
|
|
return $text;
|
|
}
|
|
|
|
function printRow($title, $value){
|
|
print '<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">'.$title.'</td>
|
|
<td width="350" class="StyleInfoData">'.$value.'</td>
|
|
</tr>';
|
|
}
|
|
|
|
|
|
|
|
?>
|