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);
|
||||
$infos = $ws->getRapport($siren, 3, 0);
|
||||
|
||||
if ($infos===false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Identite
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
$identite = new IdentiteEntreprise($infos->Identite);
|
||||
@ -642,31 +646,37 @@ class Scores_Partner_Report
|
||||
|
||||
//Global
|
||||
$this->data->Global->raisonSociale = $infos->Identite->Nom;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$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 ) {
|
||||
$view = $reportItem['view'];
|
||||
$index = $reportItem['index'];
|
||||
$this->view = new Scores_Partner_Report_Html(realpath(dirname(__FILE__)).'/Templates/'.$view);
|
||||
if ( $index !== null ) {
|
||||
foreach ($this->data->{$index} as $name => $value) {
|
||||
$this->view->assignVars($name, $value);
|
||||
foreach ( $this->report[$this->reportName] as $reportItem ) {
|
||||
$view = $reportItem['view'];
|
||||
$index = $reportItem['index'];
|
||||
$this->view = new Scores_Partner_Report_Html(realpath(dirname(__FILE__)).'/Templates/'.$view);
|
||||
if ( $index !== null ) {
|
||||
foreach ($this->data->{$index} as $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