Sfr
This commit is contained in:
parent
5bdae15214
commit
3ab263ac10
@ -443,27 +443,27 @@ class Metier_Sfr_Scoring
|
||||
|
||||
$classInsee = new Metier_Insee_MInsee();
|
||||
|
||||
//Values are already define ?
|
||||
// Values are already define ?
|
||||
if ($this->ValDateCalculIndiscore === null) {
|
||||
|
||||
//Vérifier la présence d'un calcul dans la table scores_surveillances
|
||||
// Vérifier la présence d'un calcul dans la table scores_surveillances
|
||||
$sql = "SELECT * FROM jo.scores_surveillance WHERE siren=:siren";
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->bindValue('siren', $siren);
|
||||
$stmt->execute();
|
||||
|
||||
//No results
|
||||
if ($stmt->rowCount() && $this->notCalculateInError) {
|
||||
// No results
|
||||
if ($stmt->rowCount() == 0 && $this->notCalculateInError) {
|
||||
return false;
|
||||
}
|
||||
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||
|
||||
//No score
|
||||
// No score
|
||||
if (intval($result->indiScoreDate) == 0 && $this->notCalculateInError) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($result !== null) {
|
||||
if ($stmt->rowCount() > 0) {
|
||||
|
||||
//Indiscore - aller chercher scores dans l'historique moins de X mois
|
||||
$dateUpdate = DateTime::createFromFormat('Y-m-d', substr($result->dateUpdate, 0, 10));
|
||||
|
Loading…
Reference in New Issue
Block a user