diff --git a/includes/infogreffe/infogreffews.php b/includes/infogreffe/infogreffews.php
index 5b2654995..829f65ee6 100644
--- a/includes/infogreffe/infogreffews.php
+++ b/includes/infogreffe/infogreffews.php
@@ -956,7 +956,6 @@ function infogreffe_bilan_ref($bilan)
function infogreffe_bilan_filename($siren, $ref)
{
- global $firephp;
return 'bilan-'.$siren.'-'.$ref.'.pdf';
}
@@ -998,7 +997,7 @@ function infogreffe_logfile($info){
if( !file_exists($file) ){
$entetes = array('siren', 'idCommande', 'type', 'vecteur', 'option');
$fp = fopen($file, 'w');
- fputcsv($fp, $entete);
+ fputcsv($fp, $entetes);
fclose($fp);
}
$fp = fopen($file, 'a');
diff --git a/includes/menu/menu_liens.php b/includes/menu/menu_liens.php
index 046448e9a..35c93a266 100644
--- a/includes/menu/menu_liens.php
+++ b/includes/menu/menu_liens.php
@@ -271,6 +271,10 @@ function menu_href_marques()
function menu_href_indiscore()
{
+ if (isset($_SESSION['tabInfo']['entrep']['siretSiege']) == false) {
+ return '#';
+ }
+
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
@@ -283,6 +287,10 @@ function menu_href_indiscore()
function menu_href_indiscoreplus()
{
+ if (isset($_SESSION['tabInfo']['entrep']['siretSiege']) == false) {
+ return '#';
+ }
+
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
@@ -325,6 +333,10 @@ function menu_href_rsynthese()
function menu_href_indiscore3()
{
+ if (isset($_SESSION['tabInfo']['entrep']['siretSiege']) == false) {
+ return '#';
+ }
+
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
@@ -338,6 +350,10 @@ function menu_href_indiscore3()
function menu_href_indiscore2()
{
+ if (isset($_SESSION['tabInfo']['entrep']['siretSiege']) == false) {
+ return '#';
+ }
+
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
diff --git a/includes/recherche/recherche_enq.php b/includes/recherche/recherche_enq.php
index 5dce529c1..83f3fb805 100644
--- a/includes/recherche/recherche_enq.php
+++ b/includes/recherche/recherche_enq.php
@@ -26,8 +26,8 @@ if ($_REQUEST['action']<>'envoyer')
- Identifiant (SIREN, WALDEC) |
- |
+ Identifiant (SIREN, R.N.A.) |
+ |
|
@@ -100,25 +100,25 @@ if ($_REQUEST['action']<>'envoyer')
$email = trim($formR['email']);
$remarque = trim($formR['remarque']);
- if ( preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)
- && $rs<>'' && $ville<>'' && $remarque<>'')
+ if ( preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)
+ && $rs<>'' && $ville<>'' && $remarque<>'')
{
$fp=fopen(PATH_LOGS.'enquetes.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').' - '.print_r($_REQUEST['formR'],true).print_r($tabInfo,true)."\n");
fclose($fp);
require_once 'mail/mail.php';
- sendMail(
- "Demande d'investigation",
- print_r($_REQUEST['formR'],true).print_r($tabInfo,true),
+ sendMail(
+ "Demande d'investigation",
+ print_r($_REQUEST['formR'],true).print_r($tabInfo,true),
//From
- array(
+ array(
'email' => 'contact@scores-decisions.com',
'name' => 'Contact',
- ),
+ ),
//TO
array(
0 => array(
- 'email'=> 'contact@scores-decisions.com',
+ 'email'=> 'contact@scores-decisions.com',
'name' => 'Contact'
)
)
@@ -132,8 +132,8 @@ if ($_REQUEST['action']<>'envoyer')
- }
- else
+ }
+ else
{
?>
diff --git a/includes/recherche/recherche_ent.php b/includes/recherche/recherche_ent.php
index 76d9d1495..2b5db2bb5 100644
--- a/includes/recherche/recherche_ent.php
+++ b/includes/recherche/recherche_ent.php
@@ -22,9 +22,9 @@ foreach (array('siret',
+ title="Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, R.N.A., ISIN"/>
+ title="Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, R.N.A., ISIN"/>
diff --git a/includes/scoresws/identite.php b/includes/scoresws/identite.php
index b5a58a5ac..4e2fed54b 100644
--- a/includes/scoresws/identite.php
+++ b/includes/scoresws/identite.php
@@ -100,7 +100,7 @@ function identite_autreid($autreId, $tribunalLib, $numRC)
if (isset($autreId) && $autreId!='' && ( (isset($numRC) && $numRC=='') || substr($autreId,0,1)=='W'))
{
$libTrib = '';
- if (substr($autreId,0,1)=='W') $lib = 'Identifiant Association WALDEC';
+ if (substr($autreId,0,1)=='W') $lib = 'Identifiant R.N.A.';
elseif (preg_match('/(A|B|C|D)/i', $autreId))
{
$lib = 'Numéro R.C.';
diff --git a/www/index.fct.php b/www/index.fct.php
index 1e0058c41..0eac9dd2c 100644
--- a/www/index.fct.php
+++ b/www/index.fct.php
@@ -40,11 +40,13 @@ function redimage($img_src,$dst_w,$dst_h) {
function etabSession($siret, $idEntreprise = 0){
global $client;
- if (($siret != false || $idEntreprise != false) &&
- (isset($_SESSION['tabInfo']['entrep']) == false ||
+ if ( ($siret!=false || $idEntreprise!=false) &&
+ (isset($_SESSION['tabInfo']['entrep'])==false ||
$siret!=$_SESSION['tabInfo']['entrep']['siret'] ||
- ($siret*1 == 0 &&
- $idEntreprise != $_SESSION['tabInfo']['entrep']['id']))) {
+ ($siret*1==0 && $idEntreprise!=$_SESSION['tabInfo']['entrep']['id']))
+ )
+ {
+ FB::info('getIdentite');
$O2 = $client->getIdentite($siret, $idEntreprise, false);
$etab = $O2['result'];
$tabEntrep = array();
@@ -65,9 +67,13 @@ function etabSession($siret, $idEntreprise = 0){
$tabEntrep['fj'] = $etab['FJ'];
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
$raisonSociale = $etab['Nom'];
- } else if (isset($_SESSION['tabInfo']['entrep']['raisonSociale']) == true) {
+ }
+ else if (isset($_SESSION['tabInfo']['entrep']['raisonSociale']) == true)
+ {
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
- } else {
+ }
+ else
+ {
$raisonSociale = '';
}
return $raisonSociale;
diff --git a/www/index.php b/www/index.php
index 49af69136..2f10cf7b2 100644
--- a/www/index.php
+++ b/www/index.php
@@ -30,8 +30,10 @@ if ($sortie == 'pdf') {
$siret = page_param('siret');
$siren = page_param('siren');
$idEntreprise = page_param('idEntreprise');
-$raisonSociale = etabSession($siret, $idEntreprise);
-FB::log($_SESSION, 'SESSION');
+if ($page!='identite')
+{
+ $raisonSociale = etabSession($siret, $idEntreprise);
+}
//Chargement du contenu
switch ($page)
{
diff --git a/www/pages/giant_rapport.php b/www/pages/giant_rapport.php
index 2ad8892de..ee67c9ebd 100644
--- a/www/pages/giant_rapport.php
+++ b/www/pages/giant_rapport.php
@@ -322,6 +322,9 @@ case 'Full':
case 'Compact':
print 'RAPPORT DE SYNTHESE
';
break;
+case 'CreditRecommendation':
+ print 'RAPPORT DE SCORE
';
+ break;
}
$d = unserialize($r->DataSet);
$c = $d->Company;
@@ -709,6 +712,112 @@ if (isset($c->PaymentBehaviour) == true) {
dRow('PaymentQualification', $desc);
}
print '
';
+ if (isset($c->PaymentBehaviour->AnalysisByPeriod) == true) {
+ $ap = $c->PaymentBehaviour->AnalysisByPeriod;
+ $tab = array();
+ foreach ($ap->Category as $cat) {
+ $trim =
+ pdate($cat->Period->StartDate).' - '.
+ pdate($cat->Period->EndDate);
+ $total = 0;
+ foreach (getArray($cat->DueDateExceeds) as $e) {
+ if ($e->NrOfDaysExceeds->LowerLimit->_ >= 90) {
+ $total += $e->Percentage;
+ } else {
+ $lab =
+ $e->NrOfDaysExceeds->LowerLimit->_.' to '.
+ $e->NrOfDaysExceeds->UpperLimit->_;
+ $tab[$lab][$trim] = $e->Percentage;
+ }
+ }
+ $tab['90-'][$trim] = $total;
+ }
+ ksort($tab);
+ print ''.$ap->Description->_.'
';
+ print '';
+ print '';
+ print 'Quarter | ';
+ print 'Within term | ';
+ foreach ($tab as $tranche => $valeurs) {
+ print ''.$tranche.' | ';
+ }
+ print '
';
+ foreach ($ap->Category as $cat) {
+ $trim =
+ pdate($cat->Period->StartDate).' - '.
+ pdate($cat->Period->EndDate);
+ print ''.
+ ''.$trim.' | '.
+ ''.$cat->PercentageWithinTerms.' % | ';
+ foreach ($tab as $tranche => $valeurs) {
+ if (isset($tab[$tranche][$trim]) == true) {
+ print ''.$tab[$tranche][$trim].' % | ';
+ } else {
+ print '0 % | ';
+ }
+ }
+ print '
';
+ }
+ print '
';
+ }
+ if (isset($c->PaymentBehaviour->AnalysisByAmount) == true) {
+ $ap = $c->PaymentBehaviour->AnalysisByAmount;
+ $tab = array();
+ foreach ($ap->Category as $cat) {
+ $amount = '';
+ if ( isset($cat->AmountCategory->LowerLimit) == true) {
+ $amount .= $cat->AmountCategory->LowerLimit->_;
+ }
+ $amount .= '-';
+ if ( isset($cat->AmountCategory->HigherLimit) == true) {
+ $amount .= $cat->AmountCategory->HigherLimit->_;
+ }
+ $total = 0;
+ foreach (getArray($cat->DueDateExceeds) as $e) {
+ if ($e->NrOfDaysExceeds->LowerLimit->_ >= 90) {
+ $total += $e->Percentage;
+ } else {
+ $lab =
+ $e->NrOfDaysExceeds->LowerLimit->_.' to '.
+ $e->NrOfDaysExceeds->UpperLimit->_;
+ $tab[$lab][$amount] = $e->Percentage;
+ }
+ }
+ $tab['90-'][$amount] = $total;
+ }
+ ksort($tab);
+ print ''.$ap->Description->_.'
';
+ print '';
+ print '';
+ print 'Amount | ';
+ print 'Within term | ';
+ foreach ($tab as $tranche => $valeurs) {
+ print ''.$tranche.' | ';
+ }
+ print '
';
+ foreach ($ap->Category as $cat) {
+ $amount = '';
+ if ( isset($cat->AmountCategory->LowerLimit) == true) {
+ $amount .= $cat->AmountCategory->LowerLimit->_;
+ }
+ $amount .= '-';
+ if ( isset($cat->AmountCategory->HigherLimit) == true) {
+ $amount .= $cat->AmountCategory->HigherLimit->_;
+ }
+ print ''.
+ ''.$amount.' | '.
+ ''.$cat->PercentageWithinTerms.' % | ';
+ foreach ($tab as $tranche => $valeurs) {
+ if (isset($tab[$tranche][$amount]) == true) {
+ print ''.$tab[$tranche][$amount].' % | ';
+ } else {
+ print '0 % | ';
+ }
+ }
+ print '
';
+ }
+ print '
';
+ }
}
// --------------------------------------------------------------------------- //
@@ -719,8 +828,20 @@ print '';
if (isset($c->CreditRecommendation->Date) == true) {
dRow('Date', pdate($c->CreditRecommendation->Date));
}
-foreach (getArray($c->CreditRecommendation
- ->RiskClasses->ProviderRiskClass) as $t) {
+if (isset($c->CreditRecommendation->RiskClasses) == true) {
+ foreach (getArray($c->CreditRecommendation
+ ->RiskClasses->ProviderRiskClass) as $t) {
+ if (isset($t->Description->_) == true) {
+ $desc = ' '.
+ '';
+ } else {
+ $desc = '';
+ }
+ dRow($t->RatingName->_.$desc, $t->RatingValue);
+ }
+ $t = $c->CreditRecommendation->RiskClasses->CommonRiskClass;
if (isset($t->Description->_) == true) {
$desc = ' '.
'CreditRecommendation
}
dRow($t->RatingName->_.$desc, $t->RatingValue);
}
-$t = $c->CreditRecommendation->RiskClasses->CommonRiskClass;
-if (isset($t->Description->_) == true) {
- $desc = ' '.
- '';
-} else {
- $desc = '';
-}
-dRow($t->RatingName->_.$desc, $t->RatingValue);
dRow('AmountAdvised', $c->CreditRecommendation->AmountAdvised->_.' '.
$c->CreditRecommendation->AmountAdvised->currency);
print '
';