247 lines
6.5 KiB
PHP
247 lines
6.5 KiB
PHP
<?php
|
|
|
|
//Contient les Numéros 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
|
|
if($tab['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']){
|
|
$activite = '';
|
|
foreach($tab['Taxonomy'] as $item){
|
|
if($item['Type'] == 'Nace'){
|
|
$activite.= $item['Code'].' - '.$item['Value'].'<br/>';
|
|
}
|
|
}
|
|
if($activite) printRow('Activité', $activite);
|
|
}
|
|
if($tab['Text']['Activities']){
|
|
$text = '';
|
|
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 id="resume">';
|
|
/*
|
|
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 dLiens($tab){
|
|
global $firephp;
|
|
print '<table>';
|
|
$oldKey = '';
|
|
foreach($tab['Company'] as $kCompany => $company){
|
|
if($kCompany != 'Subject'){
|
|
$text = '';
|
|
foreach($company as $detail){
|
|
$text.= $detail['Name'];
|
|
if($detail['Address']['Main']['EntireAddress']) $text.= ' (<i>'.$detail['Address']['Main']['EntireAddress'].'</i>)<br/>';
|
|
if($detail['Address']['Branch']['EntireAddress']) $text.= ' (<i>'.$detail['Address']['Branch']['EntireAddress'].'</i>)<br/>';
|
|
$text.='<br/>';
|
|
}
|
|
printRow($kCompany, $text);
|
|
}
|
|
}
|
|
print '</table>';
|
|
}
|
|
|
|
function dBilans($tab){
|
|
|
|
if($tab['AccountItem']){
|
|
foreach($tab['AccountItem'] as $kAccount => $account){
|
|
print '<div class="bilans">'.$kAccount.'</div>';
|
|
print '<span class="bilans"> The following figures are shown in units of '.$account['Units'].'</span>';
|
|
//Entête du tableau
|
|
print '<table class="bilans">';
|
|
print '<thead><tr>';
|
|
print '<th> </th>';
|
|
foreach($account['AccountingPeriod'] as $index => $period){
|
|
print '<th class="right">'.$period['Date'].'</th>';
|
|
}
|
|
print '</tr></thead>';
|
|
|
|
print '<tr>';
|
|
print '<td>Currency</td>';
|
|
foreach($account['AccountingPeriod'] as $index => $period){
|
|
print '<td class="right">'.$period['Currency'].'</td>';
|
|
}
|
|
print '</tr>';
|
|
|
|
//Contenu du tableau
|
|
foreach($account['AccountElement'] as $intitule => $values){
|
|
print '<tr>';
|
|
print '<td>'.$intitule.'</td>';
|
|
foreach($values as $value){
|
|
print '<td class="right">'.$value.'</td>';
|
|
}
|
|
print '</tr>';
|
|
}
|
|
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>';
|
|
}
|
|
|
|
|
|
|
|
?>
|