Partner : return value in fonction

This commit is contained in:
Michael RICOIS 2013-10-17 07:39:36 +00:00
parent b7be1a7ab0
commit 078e2e6060

View File

@ -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;
}
}