Library Update
This commit is contained in:
parent
6f451a0240
commit
87c283fd2d
@ -698,9 +698,9 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
}
|
||||
} else {
|
||||
switch (intval($even['insPRODPART'])) {
|
||||
case 1: $typeSiretAss = 'Loueur de fond'; break;
|
||||
case 2: $typeSiretAss = 'Locataire du fond'; break;
|
||||
case 3: $typeSiretAss = 'Prestataire de personnel'; break;
|
||||
case 1: $typeSiretAss = 'Loueur de fond'; break;
|
||||
case 2: $typeSiretAss = 'Locataire du fond'; break;
|
||||
case 3: $typeSiretAss = 'Prestataire de personnel'; break;
|
||||
}
|
||||
|
||||
$siretAss = $even['insSIRETASS'];
|
||||
@ -2748,11 +2748,9 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
$strNic = '';
|
||||
}
|
||||
$stmt = $this->conn->executeQuery("SELECT insDATEVE FROM insee.insee_even
|
||||
WHERE insSIREN=$siren $strNic AND ( insEVE LIKE 'FF' OR insEVE LIKE 'TF'
|
||||
OR insEVE LIKE '0F' OR insEVE LIKE 'TD' OR insEVE LIKE '0D' OR insEVE LIKE '410'
|
||||
OR insEVE LIKE '420' OR insEVE LIKE '425' OR insEVE LIKE '400'
|
||||
OR insEVE LIKE '430' OR insEVE LIKE '435' OR insDESTINAT != '')
|
||||
ORDER BY insDATEVE DESC LIMIT 0,1");
|
||||
WHERE insSIREN=$siren $strNic AND (
|
||||
insEVE IN ('FF', 'TF', '0F', 'TD', '0D', '410', '420', '425', '400', '430', '435', 'SC', 'SU', 'SE', 'SS', 'STE', 'STS')
|
||||
OR insDESTINAT!='' ) ORDER BY insDATEVE DESC LIMIT 0,1");
|
||||
if ($stmt->rowCount() > 0) {
|
||||
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||
$tabRet['DateClotEt'] = $result->insDATEVE;
|
||||
@ -7033,7 +7031,6 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
case 'D':
|
||||
if ($lien == 1) {
|
||||
continue;
|
||||
;
|
||||
}
|
||||
$typeLien = 'pre';
|
||||
break(2);
|
||||
@ -7094,24 +7091,24 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
}
|
||||
|
||||
$tabRet[$typeLien] = array(
|
||||
'siren' => $row['insSIREN'],
|
||||
'nic' => $row['insNIC'],
|
||||
'apeEtab' => $row['insAPET700'],
|
||||
'codeEve' => $row['insEVE'],
|
||||
'dateEve' => $row['insDATEVE'],
|
||||
'adrL1' => trim($adr1),
|
||||
'adrL2' => trim($adr2),
|
||||
'adrL3' => trim($row['insL3_CADR']),
|
||||
'adrL4' => trim($adr4),
|
||||
'adrL5' => trim($row['insL5_DISP']),
|
||||
'adrL6' => trim($row['insL6_POST']),
|
||||
'adrL7' => trim($row['insL7_ETRG']),
|
||||
'siren' => $row['insSIREN'],
|
||||
'nic' => $row['insNIC'],
|
||||
'apeEtab' => $row['insAPET700'],
|
||||
'codeEve' => $row['insEVE'],
|
||||
'dateEve' => $row['insDATEVE'],
|
||||
'adrL1' => trim($adr1),
|
||||
'adrL2' => trim($adr2),
|
||||
'adrL3' => trim($row['insL3_CADR']),
|
||||
'adrL4' => trim($adr4),
|
||||
'adrL5' => trim($row['insL5_DISP']),
|
||||
'adrL6' => trim($row['insL6_POST']),
|
||||
'adrL7' => trim($row['insL7_ETRG']),
|
||||
'depCom' => $row['insDEPCOM'],
|
||||
'rivoli' => $row['insCODEVOIE'],
|
||||
'siege' => $row['insSIEGE'],
|
||||
'destinat' => $row['insDESTINAT'],
|
||||
'typEtab' => $row['insTYPETAB'],
|
||||
'origine' => $row['insORIGINE'],
|
||||
'siege' => $row['insSIEGE'],
|
||||
'destinat' => $row['insDESTINAT'],
|
||||
'typEtab' => $row['insTYPETAB'],
|
||||
'origine' => $row['insORIGINE'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -59,15 +59,20 @@ class Metier_Partenaires_MTel
|
||||
partenaireConf, nbConf, idUpdate, dateUpdate, dateUpdate*1 AS dateUpdateYmd
|
||||
FROM jo.telephonie WHERE siren=:siren $strNic $strActif AND dateSuppr=0
|
||||
ORDER BY typeTel ASC, nbConf DESC";
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->bindValue('siren', $siren);
|
||||
$stmt->execute();
|
||||
try {
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->bindValue('siren', $siren);
|
||||
$stmt->execute();
|
||||
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||
return $tabRet;
|
||||
}
|
||||
if ($stmt->rowCount() > 0) {
|
||||
$this->enCache = true;
|
||||
while ($tabTel = $stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
if ($tabTel['typeTel'] == 'an8' && $tabTel['infoTel']*1 > 0) {
|
||||
$an8 = $tabTel['infoTel']*1;
|
||||
$an8Stmt = $this->conn->executeQuery($query);
|
||||
$sql = "SELECT libAn8 FROM jo.tabAn8 WHERE codAn8='$an8'";
|
||||
$an8Stmt = $this->conn->executeQuery($sql);
|
||||
$infoTel = '';
|
||||
if ($an8Stmt->rowCount() > 0) {
|
||||
$label = $an8Stmt->fetchColumn('libAn8');
|
||||
|
@ -85,10 +85,10 @@ class Metier_Partenaires_MTva
|
||||
$dateRef->sub(new DateInterval('P6M'));
|
||||
$dateMaj = DateTime::createFromFormat('Ymd', $tab['DateMAJ']);
|
||||
$this->vatNumber = "FR".$this->cle.$this->siren;
|
||||
if ($cle !== null) {
|
||||
if ($cle !== null | $cle != 0) {
|
||||
$this->vatDefined = true;
|
||||
return true;
|
||||
} elseif ($cle === null && $dateMaj >= $dateRef) {
|
||||
} elseif (($cle === null || $cle == 0) && $dateMaj >= $dateRef) {
|
||||
$this->vatDefined = false;
|
||||
return true;
|
||||
}
|
||||
@ -146,8 +146,8 @@ class Metier_Partenaires_MTva
|
||||
'traderStreet' => "",
|
||||
'traderPostalCode' => "",
|
||||
'traderCity' => "",
|
||||
'requesterMemberStateCode' => "",
|
||||
'requesterNumber' => "",
|
||||
'requesterMemberStateCode' => "FR",
|
||||
'requesterNumber' => $this->cle.$this->siren,
|
||||
'action' => "check",
|
||||
'check' => "Vérifier",
|
||||
],
|
||||
@ -160,11 +160,11 @@ class Metier_Partenaires_MTva
|
||||
if (preg_match('/Yes, valid VAT number/i', $body)
|
||||
|| preg_match('/Oui, numéro de TVA valide/i', $body)) {
|
||||
if ($exist) {
|
||||
$this->conn->update('sdv1.siren_tva', array('cle' => $this->cle,
|
||||
$this->conn->update('sdv1.siren_tva', array('cle' => intval($this->cle),
|
||||
'duree' => $time), array('siren' => $this->siren));
|
||||
} else {
|
||||
$this->conn->insert('sdv1.siren_tva', array('siren' => $this->siren,
|
||||
'cle' => $this->cle, 'duree' => $time));
|
||||
'cle' => intval($this->cle), 'duree' => $time));
|
||||
}
|
||||
$this->vatNumber = "FR".$this->cle.$this->siren;
|
||||
$this->vatDefined = true;
|
||||
|
Loading…
Reference in New Issue
Block a user