From 114d997b39dabe2e307ef5d2143506966532c3b4 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 26 Aug 2013 07:06:27 +0000 Subject: [PATCH] SFR : Nouvelles fonctions --- library/Metier/Sfr/Sfr.php | 54 +++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/library/Metier/Sfr/Sfr.php b/library/Metier/Sfr/Sfr.php index 4414ae83..68af77e2 100644 --- a/library/Metier/Sfr/Sfr.php +++ b/library/Metier/Sfr/Sfr.php @@ -230,10 +230,10 @@ class Metier_Sfr ); //Valeurs à remplir - protected $ValIsCAC = null; + protected $ValIsCAC = 0; protected $ValTypeEntrep = null; - protected $ValIsAdmin = null; - protected $ValIsEtranger = null; + protected $ValIsAdmin = 0; + protected $ValIsEtranger = 0; protected $ValEffectif = null; protected $ValNAF = null; protected $ValFJ = null; @@ -246,10 +246,25 @@ class Metier_Sfr protected $ValEntrepRecente = null; protected $ValContratDate = null; + protected $ValContratAge = null; protected $ValIR = null; + /** + * Indicateur VERT, ORANGE, ROUGE + * @var int + */ protected $ValFEU = null; + + /** + * Prise d'ordre + * @var int + */ protected $ValPO = null; + + /** + * Commentaire + * @var string + */ protected $ValComment = null; protected $dateCalculIndiscore; @@ -421,6 +436,10 @@ class Metier_Sfr if ($this->debug) file_put_contents('sfr.log', "INDISCORE = ".$this->ValIndiscore."\n", FILE_APPEND); + //Gestion non prospect - assignation des varaibles + //VarContratDate - ValIR + + //Rules $ruleType = array( 'VORP' , 'VORD' , 'PO'); foreach ( $ruleType as $type ) { @@ -582,7 +601,7 @@ class Metier_Sfr break; case 'LIST': - if ( in_array($this->{'Val'.$var}, $valueReal) ) { + if ( $valueReal !==null && in_array($this->{'Val'.$var}, $valueReal) ) { return true; } return false; @@ -653,6 +672,33 @@ class Metier_Sfr return $this->dateCalculIndiscore; } + public function getValDebug() + { + return array( + 'ValIsCAC' => $this->ValIsCAC, + 'ValTypeEntrep' => $this->ValTypeEntrep, + 'ValIsAdmin' => $this->ValIsAdmin, + 'ValIsEtranger' => $this->ValIsEtranger, + 'ValEffectif' => $this->ValEffectif, + 'ValNAF' => $this->ValNAF, + 'ValFJ' => $this->ValFJ, + 'ValRJ' => $this->ValRJ, + 'ValLJ' => $this->ValLJ, + 'ValSV' => $this->ValSV, + 'ValIndiscore' => $this->ValIndiscore, + 'ValInseeActif' => $this->ValInseeActif, + 'ValInseeAge' => $this->ValInseeAge, + 'ValEntrepRecente' => $this->ValEntrepRecente, + 'dateCalculIndiscore' => $this->dateCalculIndiscore, + ); + } + + public function setVal($name, $value) + { + $this->{'Val'.$name} = $value; + } + + /** * */