Partner : return value in fonction
This commit is contained in:
parent
b7be1a7ab0
commit
078e2e6060
@ -77,6 +77,10 @@ class Scores_Partner_Report
|
|||||||
$ws = new WsScores($this->login, $this->password);
|
$ws = new WsScores($this->login, $this->password);
|
||||||
$infos = $ws->getRapport($siren, 3, 0);
|
$infos = $ws->getRapport($siren, 3, 0);
|
||||||
|
|
||||||
|
if ($infos===false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//Identite
|
//Identite
|
||||||
require_once 'Scores/IdentiteEntreprise.php';
|
require_once 'Scores/IdentiteEntreprise.php';
|
||||||
$identite = new IdentiteEntreprise($infos->Identite);
|
$identite = new IdentiteEntreprise($infos->Identite);
|
||||||
@ -642,31 +646,37 @@ class Scores_Partner_Report
|
|||||||
|
|
||||||
//Global
|
//Global
|
||||||
$this->data->Global->raisonSociale = $infos->Identite->Nom;
|
$this->data->Global->raisonSociale = $infos->Identite->Nom;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getContent()
|
public function getContent()
|
||||||
{
|
{
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
||||||
$this->getDataIndiscore3();
|
if ( $this->getDataIndiscore3() ) {
|
||||||
|
|
||||||
if ( array_key_exists($this->reportName, $this->report) ) {
|
if ( array_key_exists($this->reportName, $this->report) ) {
|
||||||
|
|
||||||
foreach ( $this->report[$this->reportName] as $reportItem ) {
|
foreach ( $this->report[$this->reportName] as $reportItem ) {
|
||||||
$view = $reportItem['view'];
|
$view = $reportItem['view'];
|
||||||
$index = $reportItem['index'];
|
$index = $reportItem['index'];
|
||||||
$this->view = new Scores_Partner_Report_Html(realpath(dirname(__FILE__)).'/Templates/'.$view);
|
$this->view = new Scores_Partner_Report_Html(realpath(dirname(__FILE__)).'/Templates/'.$view);
|
||||||
if ( $index !== null ) {
|
if ( $index !== null ) {
|
||||||
foreach ($this->data->{$index} as $name => $value) {
|
foreach ($this->data->{$index} as $name => $value) {
|
||||||
$this->view->assignVars($name, $value);
|
$this->view->assignVars($name, $value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$content.= $this->view->getHtml();
|
||||||
}
|
}
|
||||||
$content.= $this->view->getHtml();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $content;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user