Merge branch 'develop' into 'master'
Develop into master - confidentiel + autre See merge request !2
This commit is contained in:
commit
11618454d8
@ -208,7 +208,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
$level = Logger::DEBUG;
|
||||
} else {
|
||||
$level = Logger::INFO;
|
||||
$level = Logger::NOTICE;
|
||||
}
|
||||
$log->pushHandler(new StreamHandler($logFile), $level);
|
||||
$log->pushProcessor(new IntrospectionProcessor());
|
||||
|
@ -78,6 +78,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
} else {
|
||||
$pathServiceUrl = 'clients/'.$client.'/v'.$version.'?wsdl';
|
||||
}
|
||||
$pathServiceUri = 'clients/'.$client.'/v'.$version;
|
||||
// --- On redéfini le nom du service
|
||||
$serviceClassName = 'Entreprise';
|
||||
$fichierWsdl = $clientClassName.'-'.$serviceClassName.'-'.$version.'.wsdl';
|
||||
@ -92,6 +93,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
} else {
|
||||
$pathServiceUrl = $serviceName.'/v'.$version.'?wsdl';
|
||||
}
|
||||
$pathServiceUri = $serviceName.'/v'.$version;
|
||||
$fichierWsdl = $serviceClassName.'-'.$version.'.wsdl';
|
||||
}
|
||||
|
||||
@ -104,6 +106,11 @@ class ServiceController extends Zend_Controller_Action
|
||||
// --- Get hostname - add compatibility with Reverse Proxy
|
||||
$hostName = $request->getHttpHost();
|
||||
$hostScheme = $request->getScheme();
|
||||
$http = new Zend_Controller_Request_Http();
|
||||
$proxyScheme = $http->getHeader('X-Forwarded-Proto');
|
||||
if ($proxyScheme == 'https') {
|
||||
$hostScheme = 'https';
|
||||
}
|
||||
$fichierWsdl = $hostName . '-' . $hostScheme . '-' . $fichierWsdl;
|
||||
$c = Zend_registry::get('config');
|
||||
$wsdlPath = $c->profil->path->shared . '/wsdl';
|
||||
@ -124,6 +131,10 @@ class ServiceController extends Zend_Controller_Action
|
||||
$wsdl->setBindingStyle(array('style' => 'document'));
|
||||
$wsdl->setClass($serviceClassName);
|
||||
|
||||
if ($hostScheme == 'https') {
|
||||
$wsdl->setUri($hostScheme.'://'.$hostName.'/'.$pathServiceUri);
|
||||
}
|
||||
|
||||
// --- Enregistrement du WSDL dans un fichier
|
||||
if (isset($_GET['wsdl-generate'])) {
|
||||
if (file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||
@ -131,7 +142,6 @@ class ServiceController extends Zend_Controller_Action
|
||||
}
|
||||
$wsdl->dump($wsdlPath . '/' . $fichierWsdl);
|
||||
echo "Le fichier $fichierWsdl a été généré";
|
||||
|
||||
// --- Génération/Fourniture du wsdl
|
||||
} elseif (isset($_GET['wsdl']) && !file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||
$wsdl->dump($wsdlPath . '/' . $fichierWsdl);
|
||||
|
@ -41,12 +41,11 @@ if (isset($opts->list)){
|
||||
$types = array('bi', 'ac');
|
||||
|
||||
// Configuration FTP
|
||||
define ('ACTES_IGNUM_FTP_URL', '192.168.3.202');
|
||||
define ('ACTES_IGNUM_FTP_URL', 'ftp.scores-decisions.com');
|
||||
define ('ACTES_IGNUM_FTP_USER', 'mpc2500');
|
||||
define ('ACTES_IGNUM_FTP_PASS', 'passmpc78');
|
||||
define ('ACTES_IGNUM_LOCAL_DIR', $c->profil->path->shared.'/files/');
|
||||
|
||||
define ('PATH_DATA', $c->profil->infogreffe->storage->path);
|
||||
$pathIn = $c->profil->path->shared.'/files';
|
||||
|
||||
$report_email = $c->profil->mail->email->support;
|
||||
$report_subject = 'Traitement des actes '.date('Y-m-d H:i:s');
|
||||
@ -116,8 +115,8 @@ function sendMail($commande, $type){
|
||||
$message.= "Save paper - think before you print";
|
||||
$message.= "\n";
|
||||
|
||||
$headers = 'From: infoslegales@scores-decisions.com' . "\r\n" .
|
||||
'Reply-To: infoslegales@scores-decisions.com';
|
||||
$headers = 'From: support@scores-decisions.com' . "\r\n" .
|
||||
'Reply-To: support@scores-decisions.com';
|
||||
|
||||
if ( mail(strtolower($commande->email), $subject, utf8_decode($message), $headers) ){
|
||||
echo date ('Y/m/d - H:i:s').' - Un email a été envoyé à '.$commande->email." pour la commande ".$commande->id.".\n";
|
||||
@ -174,7 +173,12 @@ if (!$login_result) {
|
||||
echo date ('Y/m/d - H:i:s')." - ERREUR : Impossible de s'authentifier sur le serveur FTP (".ACTES_IGNUM_FTP_URL.")!\n";
|
||||
exit;
|
||||
}
|
||||
ftp_pasv($conn_id, true);
|
||||
$contents = ftp_nlist($conn_id, "*.pdf");
|
||||
if ($contents === false) {
|
||||
echo date ('Y/m/d - H:i:s')." - ERREUR : Impossible de se connecter au serveur FTP (".ACTES_IGNUM_FTP_URL.") !\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste de tout les fichiers disponible dans le repertoire
|
||||
@ -186,7 +190,6 @@ foreach ($contents as $filename){
|
||||
$f = strtolower($filename);
|
||||
if (preg_match('/g-(ac|bi)-[0-9]+\.pdf/', $f)
|
||||
|| preg_match('/g-(ac|bi)-[0-9]+-[0-9]{1,2}\.pdf/', $f)) {
|
||||
|
||||
$part = substr(str_replace('.pdf', '', $f), 5);
|
||||
$p = strpos($part, '-');
|
||||
if ( $p === false ) {
|
||||
@ -226,9 +229,7 @@ krsort($tabFichiersFtp);
|
||||
*/
|
||||
$lastRef = '';
|
||||
$tabFichiersTemp = array();
|
||||
foreach($tabFichiersFtp as $k => $val)
|
||||
{
|
||||
|
||||
foreach($tabFichiersFtp as $k => $val) {
|
||||
$part = substr($k, 5);
|
||||
$p = strpos($part, '-');
|
||||
if ($p === false) {
|
||||
@ -254,18 +255,13 @@ foreach ( $tabCommandes as $ref => $commande ) {
|
||||
foreach ($tabFichiers as $refAssocie => $fichier) {
|
||||
|
||||
if ($ref == $refAssocie) {
|
||||
|
||||
echo date ('Y/m/d - H:i:s')." - Traitement de la commande $ref\n";
|
||||
|
||||
if ($test) {
|
||||
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier $fichier \n";
|
||||
|
||||
} else {
|
||||
|
||||
// Récupération du fichier depuis le FTP (s'il n'existe pas déjà)
|
||||
if ( !file_exists(ACTES_IGNUM_LOCAL_DIR.$fichier) ) {
|
||||
if (ftp_get($conn_id, ACTES_IGNUM_LOCAL_DIR.$fichier, $fichier, FTP_BINARY, 0)) {
|
||||
if (!file_exists($pathIn.'/'.$fichier)) {
|
||||
if (ftp_get($conn_id, $pathIn.'/'.$fichier, $fichier, FTP_BINARY, 0)) {
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier $fichier téléchargé depuis le serveur FTP.\n";
|
||||
} else {
|
||||
echo date ('Y/m/d - H:i:s')." - ERREUR : Impossible de télécharger le fichier $fichier !\n";
|
||||
@ -273,9 +269,7 @@ foreach ( $tabCommandes as $ref => $commande ) {
|
||||
}
|
||||
|
||||
switch (substr($ref,2,2)) {
|
||||
|
||||
case 'BI':
|
||||
|
||||
$infogreffe = new Metier_Infogreffe_DocBI();
|
||||
$infogreffe->setSiren($commande->siren);
|
||||
//Format date cloture
|
||||
@ -284,20 +278,18 @@ foreach ( $tabCommandes as $ref => $commande ) {
|
||||
substr($commande->bilanCloture,8,2);
|
||||
$path = $infogreffe->getFilePath($commande->bilanType, $dateCloture);
|
||||
$nomCible = $infogreffe->getFileName($commande->bilanType, $dateCloture);
|
||||
|
||||
$fileOut = PATH_DATA.'/'.$path.'/'.$nomCible;
|
||||
$fileOut = $c->profil->infogreffe->storage->path.'/'.$path.'/'.$nomCible;
|
||||
|
||||
$isFileOnStorage = false;
|
||||
|
||||
if (file_exists($fileOut)) {
|
||||
$isFileOnStorage = true;
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".ACTES_IGNUM_LOCAL_DIR.$fichier." déjà présent en ".$fileOut.".\n";
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".$pathIn.'/'.$fichier." déjà présent en ".$fileOut.".\n";
|
||||
} else {
|
||||
if (copy(ACTES_IGNUM_LOCAL_DIR.$fichier, $fileOut)) {
|
||||
if (copy($pathIn.'/'.$fichier, $fileOut)) {
|
||||
$isFileOnStorage = true;
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".ACTES_IGNUM_LOCAL_DIR.$fichier." déplacé en ".$fileOut.".\n";
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".$pathIn.'/'.$fichier." déplacé en ".$fileOut.".\n";
|
||||
} else {
|
||||
echo date ('Y/m/d - H:i:s')." ERREUR - Impossible de déplacer ".ACTES_IGNUM_LOCAL_DIR.$fichier." en ".$fileOut." !\n";
|
||||
echo date ('Y/m/d - H:i:s')." ERREUR - Impossible de déplacer ".$pathIn.'/'.$fichier." en ".$fileOut." !\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,19 +351,19 @@ foreach ( $tabCommandes as $ref => $commande ) {
|
||||
$options = $item->numGreffe . '-' . substr($item->numRC,0,2) . '-' . substr($item->numRC,2,1) . '-' . substr($item->numRC,3) . '-' . $item->num_depot;
|
||||
$nomCible = $infogreffe->getFileName($date, $commande->acteNum, $commande->acteType, $options);
|
||||
|
||||
$fileOut = PATH_DATA.'/'.$path.'/'.$nomCible;
|
||||
$fileOut = $c->profil->infogreffe->storage->path.'/'.$path.'/'.$nomCible;
|
||||
|
||||
$isFileOnStorage = false;
|
||||
|
||||
if (file_exists($fileOut)) {
|
||||
$isFileOnStorage = true;
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".ACTES_IGNUM_LOCAL_DIR.$fichier." déjà présent en ".$fileOut.".\n";
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".$pathIn.'/'.$fichier." déjà présent en ".$fileOut.".\n";
|
||||
} else {
|
||||
if (copy(ACTES_IGNUM_LOCAL_DIR.$fichier, $fileOut)) {
|
||||
if (copy($pathIn.'/'.$fichier, $fileOut)) {
|
||||
$isFileOnStorage = true;
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".ACTES_IGNUM_LOCAL_DIR.$fichier." déplacé en ".$fileOut.".\n";
|
||||
echo date ('Y/m/d - H:i:s')." - Fichier ".$pathIn.'/'.$fichier." déplacé en ".$fileOut.".\n";
|
||||
} else {
|
||||
echo date ('Y/m/d - H:i:s')." ERREUR - Impossible de déplacer ".ACTES_IGNUM_LOCAL_DIR.$fichier." en ".$fileOut." !\n";
|
||||
echo date ('Y/m/d - H:i:s')." ERREUR - Impossible de déplacer ".$pathIn.'/'.$fichier." en ".$fileOut." !\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -440,6 +432,7 @@ if (empty($report_txt)) {
|
||||
|
||||
//Envoi du mail de rapport
|
||||
if (!$test && !$testMail){
|
||||
$headers = 'From: supportdev@scores-decisions.com';
|
||||
if (mail($report_email, $report_subject, utf8_decode($report_txt))){
|
||||
echo date ('Y/m/d - H:i:s')." - Rapport envoyé.\n";
|
||||
} else {
|
||||
|
@ -5591,11 +5591,6 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
|
||||
try {
|
||||
$stmt = $this->conn->executeQuery($sql);
|
||||
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||
if ($this->logger !== null) {
|
||||
$this->logger->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// --- Traitement des resultats
|
||||
if ($stmt->rowCount() > 0) {
|
||||
@ -5856,7 +5851,6 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
$ann['ville'] = $this->Identite['Ville'];
|
||||
}
|
||||
$adresse.= ucfirst(strtolower($ann['adresse'])).', ';
|
||||
|
||||
$adresse = trim(preg_replace('/^0+/', '', preg_replace('/ +/', ' ', $adresse)));
|
||||
if (preg_match('/(3100|3200|3300|3999)/', $ann['typeEven'].';'.$ann['strEven'])) {
|
||||
$depotComptes = true;
|
||||
@ -5865,8 +5859,10 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
$strRCS = $ann['siren'] . ' RCS '. ucfirst(strtolower(strtr($ann['triNom'], array('TGIcc '=>'', 'TGI '=>'', 'TC '=>'', 'TI '=>'', )))).'. ';
|
||||
}
|
||||
|
||||
$texteAnnonce = 'Date : '.strtolower(Metier_Util_Date::dateT('Y-m-d', 'd M Y', $ann['dateJugement'])) .'. '. $this->iBodacc->getEvenement($ann['typeEven']).'. '.
|
||||
$strRCS . trim($ann['raisonSociale']). '. Adresse : '. $adresse.' '.$ann['codePostal'].' '.$ann['ville'].'. ';
|
||||
$texteAnnonce = 'Date : '.strtolower(Metier_Util_Date::dateT('Y-m-d', 'd M Y', $ann['dateJugement'])).'. '.
|
||||
$this->iBodacc->getEvenement($ann['typeEven']).'. '.
|
||||
$strRCS . trim($ann['raisonSociale']).'. Adresse : '.
|
||||
$adresse.' '.$ann['codePostal'].' '.$ann['ville'].'. ';
|
||||
|
||||
if (trim($ann['numero']) != '') {
|
||||
$texteAnnonce.='Jugement Numéro : '.trim($ann['numero']).'. ';
|
||||
@ -5881,9 +5877,9 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
&& ($ann['inter'.$mandNum.'id']>0 || trim($ann['inter'.$mandNum.'nom']) != '')) {
|
||||
$texteAnnonce.= $tabInter[$ann['inter'.$mandNum.'type']].' : '.$ann['inter'.$mandNum.'nom'];
|
||||
if ($ann['inter'.$mandNum.'id'] != 0) {
|
||||
$mandStmt = $this->conn->executeQuery("SELECT sirenGrp, sirenMand,
|
||||
tel, fax, email FROM jo.tabMandataires
|
||||
WHERE id=".$ann['inter'.$mandNum.'id']);
|
||||
$mandStmt = $this->conn->executeQuery(
|
||||
"SELECT sirenGrp, sirenMand, tel, fax, email
|
||||
FROM jo.tabMandataires WHERE id=".$ann['inter'.$mandNum.'id']);
|
||||
$mand = $mandStmt->fetch(\PDO::FETCH_ASSOC);
|
||||
if ($mand['sirenGrp'] != 0) {
|
||||
$texteAnnonce.= ', Siren SCP '.$mand['sirenGrp'];
|
||||
@ -6045,6 +6041,11 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||
if ($this->logger !== null) {
|
||||
$this->logger->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return $tabRet;
|
||||
}
|
||||
|
@ -208,8 +208,10 @@ class Metier_Liens_Base
|
||||
$sql = "SELECT LPAD(siren, 9, 0) AS siren FROM jo.liensRef WHERE id = :id";
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->bindValue('id', $this->idRef);
|
||||
if ($stmt->rowCount() > 0) {
|
||||
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||
$siren = $result->siren;
|
||||
}
|
||||
} else {
|
||||
$siren = $this->siren;
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ class Metier_Partenaires_MBilans
|
||||
* Nombre de bilans maximums retournés
|
||||
* @return array
|
||||
*/
|
||||
public function listeBilans($accesPartenaire = false, $nbMaxBilans = 0)
|
||||
public function listeBilans($accesPartenaire = false, $nbMaxBilans = 0, $idClient = 0)
|
||||
{
|
||||
$dateDerDepot = 0;
|
||||
$tabRet = $tabRet2 = $tabRet3 = $tabRet = array();
|
||||
@ -358,12 +358,21 @@ class Metier_Partenaires_MBilans
|
||||
if ($this->companyEvenDateStop !== null) {
|
||||
$where.= " AND dateExercice<'".$this->companyEvenDateStop."'";
|
||||
}
|
||||
|
||||
// --- Si c'est un client qui consulte, alors il ne peut voir que ses bilans confidentiels ou tous les bilans publiques.
|
||||
// --- 0 : consultation de l'application (calcul du score ...)
|
||||
// --- 1 : consultation d'un membre de scores et décisions
|
||||
// --- 147 : consultation d'un opérateur de l'arménie
|
||||
if ($idClient > 1 && $idClient != 147) {
|
||||
$where.= " AND (confidentiel_client = ".$idClient." OR confidentiel = 0)";
|
||||
}
|
||||
|
||||
$where.= " ORDER BY dateExercice DESC, CASE typeBilan WHEN 'N' THEN 1 WHEN 'S' THEN 2 ELSE 3 END";
|
||||
if ($nbMaxBilans > 0) {
|
||||
$where.= " LIMIT 0, $nbMaxBilans";
|
||||
}
|
||||
|
||||
$fields = "typeBilan, dateProvPartenaire, dateExercice, dateExercicePre, dureeExercice, dureeExercicePre, monnaieOrigine, dateInsert, partenaire";
|
||||
$fields = "typeBilan, dateProvPartenaire, dateExercice, dateExercicePre, dureeExercice, dureeExercicePre, monnaieOrigine, dateInsert, partenaire, confidentiel, confidentiel_client";
|
||||
$listeNb = 0;
|
||||
try {
|
||||
$listeSql = "SELECT $fields FROM jo.bilans WHERE $where";
|
||||
@ -391,6 +400,8 @@ class Metier_Partenaires_MBilans
|
||||
'dureeExercicePre' => $bil['dureeExercicePre'],
|
||||
'monnaie' => $bil['monnaieOrigine'],
|
||||
'source' => $bil['partenaire'],
|
||||
'confidentiel' => $bil['confidentiel'],
|
||||
'confidentielClient' => $bil['confidentiel_client'],
|
||||
);
|
||||
$tabTri[''.$bil['dateExercice'].'-'.$bil['typeBilan']] = $bil['typeBilan'].$millesime;
|
||||
}
|
||||
|
@ -9,8 +9,7 @@ if (defined('DEBUG') == false) {
|
||||
// --------------------------------------------------------------------------- //
|
||||
// databaseJO
|
||||
// --------------------------------------------------------------------------- //
|
||||
function databaseJO()
|
||||
{
|
||||
function databaseJO() {
|
||||
$db = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, 'jo');
|
||||
if (mysqli_connect_error()) {
|
||||
println('Ne peut pas se connecter a la base.');
|
||||
@ -23,8 +22,7 @@ function databaseJO()
|
||||
// --------------------------------------------------------------------------- //
|
||||
// println
|
||||
// --------------------------------------------------------------------------- //
|
||||
function println($ln = '')
|
||||
{
|
||||
function println($ln = '') {
|
||||
print $ln.'<br/>';
|
||||
}
|
||||
|
||||
@ -32,17 +30,11 @@ function println($ln = '')
|
||||
// debugln
|
||||
// --------------------------------------------------------------------------- //
|
||||
if (DEBUG) {
|
||||
function debugln($ln = '')
|
||||
{
|
||||
function debugln($ln = '') {
|
||||
print $ln.'<br/>';
|
||||
}
|
||||
} elseif (LOCAL) {
|
||||
function debugln($ln = '')
|
||||
{
|
||||
}
|
||||
} else {
|
||||
function debugln($ln = '')
|
||||
{
|
||||
function debugln($ln = '') {
|
||||
/*
|
||||
$fp = fopen(LOG_PATH.'/recherchesDebug.log', 'a');
|
||||
fwrite($fp, $ln."\n");
|
||||
|
@ -591,11 +591,11 @@ class Entreprise extends Scores_Ws_Server
|
||||
$tabAct = array();
|
||||
foreach ($tabA as $i=>$lien) {
|
||||
$liens = new Actionnaire();
|
||||
$liens->Pmin = $lien['PDetention'];
|
||||
$liens->MajMin = $lien['MajMin'];
|
||||
$liens->RaisonSociale = $lien['RS'];
|
||||
$liens->Pays = $lien['adresse_pays'];
|
||||
$liens->Siren = $lien['siren'];
|
||||
$liens->Pmin = $lien->PDetention;
|
||||
$liens->MajMin = $lien->MajMin;
|
||||
$liens->RaisonSociale = $lien->RS;
|
||||
$liens->Pays = $lien->adresse_pays;
|
||||
$liens->Siren = $lien->siren;
|
||||
$liens->Actif = 1;
|
||||
$tabAct[] = $liens;
|
||||
}
|
||||
@ -631,6 +631,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
/** Y a t il eu des informations relatives à une cession ? **/
|
||||
$iGreffes = new Metier_Partenaires_MGreffes();
|
||||
$tabCes = $iGreffes->getInfosCessions($siren);
|
||||
if ($tabCes) {
|
||||
$identiteProcol->CessionJugeLib = $tabCes['cessJuge'];
|
||||
$identiteProcol->CessionJugeDate = $tabCes['cessDateJuge'];
|
||||
@ -911,14 +912,15 @@ class Entreprise extends Scores_Ws_Server
|
||||
$annsB=$iInsee->getAnnoncesBalo($siren);
|
||||
$annsA=$iInsee->getAnnoncesAsso($siren);
|
||||
$annsM=$iInsee->getAnnoncesBoamp($siren, $idAnn);
|
||||
} elseif ($filtre==1)
|
||||
} elseif ($filtre==1) {
|
||||
$anns=$iInsee->getAnnoncesLegales($siren, $idAnn);
|
||||
elseif ($filtre==2)
|
||||
} elseif ($filtre==2) {
|
||||
$annsB=$iInsee->getAnnoncesBalo($siren, $idAnn);
|
||||
elseif ($filtre==3)
|
||||
} elseif ($filtre==3) {
|
||||
$annsA=$iInsee->getAnnoncesAsso($siren, $idAnn);
|
||||
elseif ($filtre==4)
|
||||
} elseif ($filtre==4) {
|
||||
$annsM=$iInsee->getAnnoncesBoamp($siren, $idAnn);
|
||||
}
|
||||
|
||||
if (empty($anns) && empty($annsB) && empty($annsA) && empty($annsM))
|
||||
{
|
||||
@ -3335,7 +3337,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
if(!in_array($key, array('SIREN', 'DATE_FRAICHE_BILAN',
|
||||
'DATE_CLOTURE', 'DATE_CLOTURE_PRE', 'DUREE_MOIS',
|
||||
'DUREE_MOIS_PRE', 'MONNAIE', 'CONSOLIDE', 'MONNAIE_ORI',
|
||||
'MONNAIE_LIV_UNITE', 'SOURCE', 'devise'))){
|
||||
'MONNAIE_LIV_UNITE', 'SOURCE', 'devise', 'TOP_CONFIDENTIEL'))){
|
||||
$resultPoste = new BilanPoste();
|
||||
$resultPoste->id = $key;
|
||||
$resultPoste->val = $value;
|
||||
|
@ -4384,7 +4384,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(true);
|
||||
$tabBilans = $mBil->listeBilans(true, 0, $this->User->idClient);
|
||||
foreach($tabBilans as $bilan) {
|
||||
$element = new ListeBilans();
|
||||
$element->dateProvPartenaire = $bilan['dateProvPartenaire']; //@todo : date
|
||||
@ -4397,6 +4397,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$element->dureeExercicePre = $bilan['dureeExercicePre'];
|
||||
$element->monnaie = $bilan['monnaie'];
|
||||
$element->source = $bilan['source'];
|
||||
$element->confidentiel = $bilan['confidentiel'];
|
||||
$element->confidentielClient = $bilan['confidentielClient'];
|
||||
$tabRet[] = $element;
|
||||
}
|
||||
|
||||
@ -4703,7 +4705,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
// Ratios
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5, $this->User->idClient);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
if ($nbBilans > 0) {
|
||||
|
@ -2366,6 +2366,11 @@ class ListeBilans
|
||||
* @var int
|
||||
*/
|
||||
public $source;
|
||||
|
||||
/** Confidentialité du bilan (1 si confidentiel, 0 sinon)
|
||||
* @var int
|
||||
*/
|
||||
public $confidentiel;
|
||||
}
|
||||
|
||||
class SetSurveillanceReturn
|
||||
@ -2550,6 +2555,11 @@ class Bilan
|
||||
*/
|
||||
public $SOURCE;
|
||||
|
||||
/** Bilan confidentiel ou non
|
||||
* @var string
|
||||
*/
|
||||
public $TOP_CONFIDENTIEL;
|
||||
|
||||
/** Tableau de postes du bilan dans le formalisme associé au Type de bilan
|
||||
* @var BilanPoste[]
|
||||
*/
|
||||
|
@ -1460,10 +1460,10 @@ class Saisie extends Scores_Ws_Server
|
||||
$row = $bilansM->fetchRow($sql);
|
||||
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1493,10 +1493,10 @@ class Saisie extends Scores_Ws_Server
|
||||
try {
|
||||
$id = $bilansM->insert($dataToInsert);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1512,10 +1512,10 @@ class Saisie extends Scores_Ws_Server
|
||||
try {
|
||||
$historiquesM->insert($backupData);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1540,10 +1540,10 @@ class Saisie extends Scores_Ws_Server
|
||||
try {
|
||||
$id = $bilansM->update($dataToUpdate, 'id = '.$row->id);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1566,10 +1566,10 @@ class Saisie extends Scores_Ws_Server
|
||||
'postesDiff' => implode(';', $postesDiff),
|
||||
));
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ callInfo.inparams
|
||||
callInfo.inparams[0].name
|
||||
u'parameters'
|
||||
callInfo.inparams[0].type
|
||||
(u'http://wse.scores-decisions.com:8081/service', u'status')
|
||||
(u'http://hostname/service', u'status')
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
SELECT codNaf5 AS codNaf, libNaf5 AS libNaf
|
||||
FROM jo.tabNaf5
|
||||
UNION SELECT codNaf700 AS codNaf, libNaf700 AS libNaf
|
||||
FROM jo.tabNaf4
|
||||
ORDER BY codNaf
|
||||
SELECT codNaf5 AS codNaf, libNaf5 AS libNaf FROM jo.tabNaf5 WHERE LENGTH(codNaf5)=5
|
||||
UNION
|
||||
SELECT codNaf700 AS codNaf, libNaf700 AS libNaf FROM jo.tabNaf4 WHERE libNaf700!='' ORDER BY codNaf;
|
Loading…
Reference in New Issue
Block a user