Formattage

This commit is contained in:
Michael RICOIS 2015-08-31 14:01:55 +00:00
parent aeec1e28ec
commit 886ef055ac

View File

@ -42,7 +42,6 @@ class MTva
$info = $this->iDb->select('sdv1.siren_tva', "LPAD(cle,2,0) AS cle, DATE_FORMAT(dateMod,'%Y%m%d') as DateMAJ", "siren=$siren", false, MYSQL_ASSOC);
$tab=$info[0];
if (count($tab)>0) {
//sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMTva sur $siren en cache", print_r($tab, true));
if ( $tab['cle']<>NULL || ( $tab['cle']==NULL && $tab['DateMAJ']>=date('Ymd',mktime(0,0,0,date('m')-6,date('d'),date('Y'))) )) {
$cle=$tab['cle'];
if ($cle==NULL) { $attribue=false; $cle=$cleAlgo; }
@ -51,7 +50,6 @@ class MTva
$this->vatDefined=$attribue;
return true;
}
//sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMTva sur $siren REVALIDATION", print_r($tab, true));
}
$cle=$cleAlgo;
$nbIndispo=0;
@ -98,8 +96,7 @@ class MTva
$this->vatDefined=true;
return true;
//return array('error'=>array('errnum'=>0, 'errmsg'=>''), 'result'=>array('siren'=>$siren, 'vatNumber'=>"FR$cle$siren", 'vatDefined'=>true));
} elseif (strpos($body, 'Service non disponible')>0 ||
strpos($body, 'ponse trop long.')>0) {
} elseif (strpos($body, 'Service non disponible')>0 || strpos($body, 'ponse trop long.')>0) {
$nbIndispo++;
if ($nbIndispo<3) {
//echo date ('Y/m/d - H:i:s') .' - '.$eol;