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