Reduce notice

This commit is contained in:
Michael RICOIS 2017-01-31 11:27:03 +01:00
parent 47b413ee21
commit 7dd700c160

View File

@ -113,11 +113,15 @@ class IdentiteEntreprise
} }
public function getCapitalisationTexte() public function getCapitalisationTexte()
{ {
$capitalisation = $this->identite->Bourse->capitalisation; if (!isset($this->identite->Bourse)) {
if ($this->identite->Isin == '' || intval($capitalisation) == 0) return false;
}
if ($this->identite->Isin == '') {
return false; return false;
}
$date = new Zend_Date($this->identite->Bourse->derCoursDate, 'yyyy-MM-dd'); $date = new Zend_Date($this->identite->Bourse->derCoursDate, 'yyyy-MM-dd');
$capitalisation = $this->identite->Bourse->capitalisation;
return number_format($capitalisation, 0, '', ' ').' € au '.$date->toString('dd/MM/yyyy'); return number_format($capitalisation, 0, '', ' ').' € au '.$date->toString('dd/MM/yyyy');
} }