ajout message bilan confidentiel lors de la consultations d'un bilan de liasse fiscale, ajout d'un champ confidentiel lors de la saisie d'un bilan

This commit is contained in:
benoitpotier 2017-03-17 11:55:24 +01:00
parent c12ac41b8a
commit 4a384d6f79
6 changed files with 644 additions and 619 deletions

View File

@ -9,203 +9,203 @@ class SaisieController extends Zend_Controller_Action
* test de type de voie
* @todo vérifier si type de voie à jour
*/
protected $codVoie = array(
'ABE' => "Abbaye",
'AGL' => "Agglomération",
'AIRE' => "Aire",
'ALL' => "Allée",
'ALL' => "Allee",
'ACH' => "Ancien chemin",
'ART' => "Ancienne route",
'ANSE' => "Anse",
'ARC' => "Arcade",
'AUT' => "Autoroute",
'AV' => "Avenue",
'BRE' => "Barrière",
'BCH' => "Bas chemin",
'BSTD' => "Bastide",
'BAST' => "Baston",
'BEGI' => "Beguinage",
'BER' => "Berge",
'BOIS' => "Bois",
'BCLE' => "Boucle",
'BD' => "Boulevard",
'BRG' => "Bourg",
'BUT' => "Butte",
'CALE' => "Cale",
'CAMP' => "Camp",
'CGNE' => "Campagne",
'CPG' => "Camping",
'CARR' => "Carré",
'CAU' => "Carreau",
'CAR' => "Carrefour",
'CARE' => "Carrière",
'CST' => "Castel",
'CAV' => "Cavée",
'CTRE' => "Central",
'CTRE' => "Centre",
'CHL' => "Chalet",
'CHP' => "Chapelle",
'CHI' => "Charmille",
'CHT' => "Château",
'CHS' => "Chaussée",
'CHE' => "Chemin",
'CHV' => "Chemin vicinaux",
'CHV' => "Chemin vicinal",
'CHEM' => "Cheminement",
'CITE' => "Cîte",
'CLOI' => "Cloître",
'CLOS' => "Clos",
'COL' => "Col",
'COLI' => "Colline",
'CTR' => "Contour",
'COR' => "Corniche",
'COTE' => "Côte",
'COTT' => "Cottage",
'COUR' => "Cour",
'CRS' => "Cours",
'DARS' => "Darse",
'DEG' => "Degré",
'DSG' => "Descente",
'DSC' => "Descente",
'DIG' => "Digue",
'DOM' => "Domaine",
'ECA' => "Ecart",
'ECL' => "Ecluse",
'EGL' => "Eglise",
'EN' => "Enceinte",
'ENV' => "Enclave",
'ENC' => "Enclos",
'ESC' => "Escalier",
'ESPA' => "Espace",
'ESP' => "Esplanade",
'ETING' => "Etang",
'FG' => "Faubourg",
'FRM' => "Ferme",
'FON' => "Fontaine",
'FORT' => "Fort",
'FORM' => "Forum",
'FOS' => "Fosse",
'FOYR' => "Foyer",
'GAL' => "Galerie",
'GARE' => "Gare",
'GARN' => "Garenne",
'GBD' => "Grand boulevard",
'GDEN' => "Grande ensemble",
'GR' => "Grande rue",
'GRI' => "Grille",
'GRIM' => "Grimpette",
'GPE' => "Groupe",
'GPT' => "Groupement",
'HLE' => "Halle",
'HAM' => "Hameau",
'HCH' => "Haut chemin",
'HIP' => "Hippodrome",
'HLM' => "HLM",
'ILE' => "Ile",
'IMM' => "Immeuble",
'IMP' => "Impasse",
'JARD' => "Jardin",
'JTE' => "Jetée",
'LEVE' => "Levée",
'LD' => "Lieu dit",
'LD' => "Lieudit",
'LOT' => "Lotissement",
'MAIL' => "Mail",
'MF' => "Maison forestière",
'MAN' => "Manoir",
'MAR' => "Marche",
'MAS' => "Mas",
'MET' => "Métro",
'MTE' => "Montée",
'MLN' => "Moulin",
'MUS' => "Musée",
'NTE' => "Nouvelle route",
'PAL' => "Palais",
'PARC' => "Parc",
'PKG' => "Parking",
'PRV' => "Parvis",
'PAS' => "Passage",
'PN' => "Passage à niveau",
'PASS' => "Passe",
'PLE' => "Passerelle",
'PAT' => "Patio",
'PAV' => "Pavillon",
'PERI' => "Périphérique",
'PSTY' => "Péristyle",
'PTA' => "Petites allée",
'PCH' => "Petit chemin",
'PAE' => "Petite avenue",
'PIM' => "Petite impasse",
'PRT' => "Petite route",
'PTR' => "Petite rue",
'PL' => "Place",
'PLCI' => "Placis",
'PLAG' => "Plage",
'PLN' => "Plaine",
'PLAN' => "Plan",
'PLT' => "Plateau",
'PNT' => "Pointe",
'PONT' => "Pont",
'PCH' => "Porche",
'PORT' => "Port",
'PTE' => "Porte",
'PORQ' => "Portique",
'POT' => "Poterne",
'POUR' => "Pourtour",
'PRE' => "Pré",
'PRQ' => "Presqu'île",
'PROM' => "Promenade",
'QU' => "Quai",
'QUAI' => "Quai",
'QUA' => "Quartier",
'RAC' => "Raccourci",
'RAID' => "Raidillon",
'RPE' => "Rampe",
'REM' => "Rempart",
'RES' => "Résidence",
'ROC' => "Roc",
'ROC' => "Rocade",
'RPT' => "Rond point",
'ROQT' => "Roquet",
'RTD' => "Rotonde",
'RTE' => "Route",
'R' => "Rue",
'RUE' => "Rue",
'RLE' => "Ruelle",
'SEN' => "Sente",
'SEN' => "Sentier",
'SQ' => "Square",
'STDE' => "Stade",
'STA' => "Station",
'TPL' => "Terre plein",
'TRN' => "Terrain",
'TSSE' => "Terrasse",
'TRT' => "Tertre",
'TOUR' => "Tour",
'TRA' => "Traverse",
'VAL' => "Vallon",
'VAL' => "Vallée",
'VEN' => "Venelle",
'VIA' => "Via",
'VTE' => "Vieille route",
'VCHE' => "Vieux chemin",
'VLA' => "Villa",
'VGE' => "Village",
'VLGE' => "Village",
'VOI' => "Voie",
'VOIE' => "Voie",
'ZONE' => "Zone",
'ZAC' => "Zone d'aménagement concerté",
'Z A C' => "Zone d'aménagement concerté",
'ZAD' => "Zone d'aménagement différé",
'Z A D' => "Zone d'aménagement différé",
'ZA' => "Zone artisanale",
'Z A' => "Zone artisanale",
'ZI' => "Zone industrielle",
'Z I' => "Zone industrielle",
'ZUP' => "Zone à urbaniser en priorité",
'Z U P' => "Zone à urbaniser en priorité",
protected $codVoie = array(
'ABE' => "Abbaye",
'AGL' => "Agglomération",
'AIRE' => "Aire",
'ALL' => "Allée",
'ALL' => "Allee",
'ACH' => "Ancien chemin",
'ART' => "Ancienne route",
'ANSE' => "Anse",
'ARC' => "Arcade",
'AUT' => "Autoroute",
'AV' => "Avenue",
'BRE' => "Barrière",
'BCH' => "Bas chemin",
'BSTD' => "Bastide",
'BAST' => "Baston",
'BEGI' => "Beguinage",
'BER' => "Berge",
'BOIS' => "Bois",
'BCLE' => "Boucle",
'BD' => "Boulevard",
'BRG' => "Bourg",
'BUT' => "Butte",
'CALE' => "Cale",
'CAMP' => "Camp",
'CGNE' => "Campagne",
'CPG' => "Camping",
'CARR' => "Carré",
'CAU' => "Carreau",
'CAR' => "Carrefour",
'CARE' => "Carrière",
'CST' => "Castel",
'CAV' => "Cavée",
'CTRE' => "Central",
'CTRE' => "Centre",
'CHL' => "Chalet",
'CHP' => "Chapelle",
'CHI' => "Charmille",
'CHT' => "Château",
'CHS' => "Chaussée",
'CHE' => "Chemin",
'CHV' => "Chemin vicinaux",
'CHV' => "Chemin vicinal",
'CHEM' => "Cheminement",
'CITE' => "Cîte",
'CLOI' => "Cloître",
'CLOS' => "Clos",
'COL' => "Col",
'COLI' => "Colline",
'CTR' => "Contour",
'COR' => "Corniche",
'COTE' => "Côte",
'COTT' => "Cottage",
'COUR' => "Cour",
'CRS' => "Cours",
'DARS' => "Darse",
'DEG' => "Degré",
'DSG' => "Descente",
'DSC' => "Descente",
'DIG' => "Digue",
'DOM' => "Domaine",
'ECA' => "Ecart",
'ECL' => "Ecluse",
'EGL' => "Eglise",
'EN' => "Enceinte",
'ENV' => "Enclave",
'ENC' => "Enclos",
'ESC' => "Escalier",
'ESPA' => "Espace",
'ESP' => "Esplanade",
'ETING' => "Etang",
'FG' => "Faubourg",
'FRM' => "Ferme",
'FON' => "Fontaine",
'FORT' => "Fort",
'FORM' => "Forum",
'FOS' => "Fosse",
'FOYR' => "Foyer",
'GAL' => "Galerie",
'GARE' => "Gare",
'GARN' => "Garenne",
'GBD' => "Grand boulevard",
'GDEN' => "Grande ensemble",
'GR' => "Grande rue",
'GRI' => "Grille",
'GRIM' => "Grimpette",
'GPE' => "Groupe",
'GPT' => "Groupement",
'HLE' => "Halle",
'HAM' => "Hameau",
'HCH' => "Haut chemin",
'HIP' => "Hippodrome",
'HLM' => "HLM",
'ILE' => "Ile",
'IMM' => "Immeuble",
'IMP' => "Impasse",
'JARD' => "Jardin",
'JTE' => "Jetée",
'LEVE' => "Levée",
'LD' => "Lieu dit",
'LD' => "Lieudit",
'LOT' => "Lotissement",
'MAIL' => "Mail",
'MF' => "Maison forestière",
'MAN' => "Manoir",
'MAR' => "Marche",
'MAS' => "Mas",
'MET' => "Métro",
'MTE' => "Montée",
'MLN' => "Moulin",
'MUS' => "Musée",
'NTE' => "Nouvelle route",
'PAL' => "Palais",
'PARC' => "Parc",
'PKG' => "Parking",
'PRV' => "Parvis",
'PAS' => "Passage",
'PN' => "Passage à niveau",
'PASS' => "Passe",
'PLE' => "Passerelle",
'PAT' => "Patio",
'PAV' => "Pavillon",
'PERI' => "Périphérique",
'PSTY' => "Péristyle",
'PTA' => "Petites allée",
'PCH' => "Petit chemin",
'PAE' => "Petite avenue",
'PIM' => "Petite impasse",
'PRT' => "Petite route",
'PTR' => "Petite rue",
'PL' => "Place",
'PLCI' => "Placis",
'PLAG' => "Plage",
'PLN' => "Plaine",
'PLAN' => "Plan",
'PLT' => "Plateau",
'PNT' => "Pointe",
'PONT' => "Pont",
'PCH' => "Porche",
'PORT' => "Port",
'PTE' => "Porte",
'PORQ' => "Portique",
'POT' => "Poterne",
'POUR' => "Pourtour",
'PRE' => "Pré",
'PRQ' => "Presqu'île",
'PROM' => "Promenade",
'QU' => "Quai",
'QUAI' => "Quai",
'QUA' => "Quartier",
'RAC' => "Raccourci",
'RAID' => "Raidillon",
'RPE' => "Rampe",
'REM' => "Rempart",
'RES' => "Résidence",
'ROC' => "Roc",
'ROC' => "Rocade",
'RPT' => "Rond point",
'ROQT' => "Roquet",
'RTD' => "Rotonde",
'RTE' => "Route",
'R' => "Rue",
'RUE' => "Rue",
'RLE' => "Ruelle",
'SEN' => "Sente",
'SEN' => "Sentier",
'SQ' => "Square",
'STDE' => "Stade",
'STA' => "Station",
'TPL' => "Terre plein",
'TRN' => "Terrain",
'TSSE' => "Terrasse",
'TRT' => "Tertre",
'TOUR' => "Tour",
'TRA' => "Traverse",
'VAL' => "Vallon",
'VAL' => "Vallée",
'VEN' => "Venelle",
'VIA' => "Via",
'VTE' => "Vieille route",
'VCHE' => "Vieux chemin",
'VLA' => "Villa",
'VGE' => "Village",
'VLGE' => "Village",
'VOI' => "Voie",
'VOIE' => "Voie",
'ZONE' => "Zone",
'ZAC' => "Zone d'aménagement concerté",
'Z A C' => "Zone d'aménagement concerté",
'ZAD' => "Zone d'aménagement différé",
'Z A D' => "Zone d'aménagement différé",
'ZA' => "Zone artisanale",
'Z A' => "Zone artisanale",
'ZI' => "Zone industrielle",
'Z I' => "Zone industrielle",
'ZUP' => "Zone à urbaniser en priorité",
'Z U P' => "Zone à urbaniser en priorité",
);
/**
@ -904,7 +904,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('siret', $siret);
}
public function liasseAction()
public function liasseAction()
{
$request = $this->getRequest();
@ -915,16 +915,18 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('siren', $siren);
$session = new Scores_Session_Entreprise($siret, $id);
$this->view->assign('siret', $siret);
$this->view->assign('siret', $siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
require_once 'Scores/WsScores.php';
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$selection = $request->getParam('selection', '');
$selection = $request->getParam('selection', '');
if ( !empty($selection) ) {
list($date, $type) = explode(':', $selection);
list($date, $type) = explode(':', $selection);
$confidentiel = 0;
// --- Correction d'un bilan
if ($date!='NEW') {
$milDate = $milDatePre = null;
@ -940,6 +942,7 @@ class SaisieController extends Zend_Controller_Action
$milDatePre = $item->dateExercice;
}
}
$confidentiel = $item->confidentiel;
}
}
@ -954,6 +957,7 @@ class SaisieController extends Zend_Controller_Action
$infos->dureeMois = $response->DUREE_MOIS;
$infos->dureeMoisPre = $response->DUREE_MOIS_PRE;
$infos->unite = empty($response->MONNAIE_LIV_UNITE) ? 'U' : $response->MONNAIE_LIV_UNITE;
$confidentiel = $response->TOP_CONFIDENTIEL;
$postes = array();
foreach ($response->POSTES->item as $item) {
$postes[$item->id] = $item->val;
@ -969,6 +973,7 @@ class SaisieController extends Zend_Controller_Action
$infos->dateCloturePre = $response->DATE_CLOTURE;
$infos->dureeMoisPre = $response->DUREE_MOIS;
$infos->unite = empty($response->MONNAIE_LIV_UNITE) ? 'U' : $response->MONNAIE_LIV_UNITE;
$confidentiel = $response->TOP_CONFIDENTIEL;
$postesN1 = array();
foreach ($response->POSTES->item as $item) {
$postesN1[$item->id] = $item->val;
@ -1233,63 +1238,63 @@ class SaisieController extends Zend_Controller_Action
}
}
$ancres = array(
'C' => array(
'actif' => 'Actif',
'passif' => 'Passif',
$ancres = array(
'C' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
//+ Poste YP pour l'effectif du groupe
),
'N' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
'immobilisations' => 'Immobilisations',
'amortissements' => 'Amortissements',
'provisions' => 'Provisions',
//+ Poste YP pour l'effectif du groupe
),
'N' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
'immobilisations' => 'Immobilisations',
'amortissements' => 'Amortissements',
'provisions' => 'Provisions',
'creancesDettes' => 'Créances, Dettes',
'resultatfiscal' => 'Détermination du résultat fiscal',
'deficit' => 'DÉFICITS, INDEMNITÉS POUR CONGÉS À PAYER ET PROVISIONS NON DÉDUCTIBLES',
'deficit' => 'DÉFICITS, INDEMNITÉS POUR CONGÉS À PAYER ET PROVISIONS NON DÉDUCTIBLES',
'affectation' => 'Affectation',
'annexe16' => 'DÉTERMINATION DE LA VALEUR AJOUTÉE PRODUITE AU COURS DE L\'EXERCICE',
),
'S' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
'immobilisations' => 'Immobilisations',
'amortissements' => 'Amortissements',
'provisions' => 'Provisions',
'creancesDettes' => 'Créances, Dettes',
'affectation' => 'Affectation'
),
'A' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
),
'B' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
),
'annexe16' => 'DÉTERMINATION DE LA VALEUR AJOUTÉE PRODUITE AU COURS DE L\'EXERCICE',
),
'S' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
'immobilisations' => 'Immobilisations',
'amortissements' => 'Amortissements',
'provisions' => 'Provisions',
'creancesDettes' => 'Créances, Dettes',
'affectation' => 'Affectation'
),
'A' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
),
'B' => array(
'actif' => 'Actif',
'passif' => 'Passif',
'compteDeResultat' => 'Compte de résultat',
),
);
if (!empty($infos)) {
// --- Default value pour les nouveaux bilans
if ( is_string($infos) && $infos == 'NEW' ) {
$dateCloture = (date('Y')-1).'1231';
$dureeMois = '12';
$dateCloturePre = 'AAAAMMJJ';
if ( is_string($infos) && $infos == 'NEW' ) {
$dateCloture = (date('Y')-1).'1231';
$dureeMois = '12';
$dateCloturePre = 'AAAAMMJJ';
$dureeMoisPre = '0';
$unite = 'U';
$unite = 'U';
}
// --- Default value pour l' edition de bilan
else {
$dateCloture = ($infos->dateCloture!='') ? $infos->dateCloture : $date;
$dureeMois = ($infos->dureeMois!='') ? $infos->dureeMois : '12';
$dateCloturePre = empty($infos->dateCloturePre) ? 'AAAAMMJJ' : $infos->dateCloturePre ;
$dureeMoisPre = empty($infos->dureeMoisPre) ? '0' : $infos->dureeMoisPre;
$dateCloture = ($infos->dateCloture!='') ? $infos->dateCloture : $date;
$dureeMois = ($infos->dureeMois!='') ? $infos->dureeMois : '12';
$dateCloturePre = empty($infos->dateCloturePre) ? 'AAAAMMJJ' : $infos->dateCloturePre ;
$dureeMoisPre = empty($infos->dureeMoisPre) ? '0' : $infos->dureeMoisPre;
$unite = $infos->unite;
$this->view->assign('liasse', $postes);
}
@ -1298,23 +1303,24 @@ class SaisieController extends Zend_Controller_Action
$dateCloture = substr($dateCloture,6,2).'/'.substr($dateCloture,4,2).'/'.substr($dateCloture,0,4);
$dateCloturePre = substr($dateCloturePre,6,2).'/'.substr($dateCloturePre,4,2).'/'.substr($dateCloturePre,0,4);
$this->view->assign('dateCloture', $dateCloture);
$this->view->assign('dateCloturePre', $dateCloturePre);
$this->view->assign('dureeMois', $dureeMois);
$this->view->assign('dateCloture', $dateCloture);
$this->view->assign('dateCloturePre', $dateCloturePre);
$this->view->assign('dureeMois', $dureeMois);
$this->view->assign('dureeMoisPre', $dureeMoisPre);
$this->view->assign('unite', $unite);
$this->view->assign('unite', $unite);
$this->view->assign('typeBilan', $type);
$this->view->assign('confidentiel', $confidentiel);
$this->view->assign('ancres', $ancres[$type]);
$this->view->inlineScript()->appendFile('/libs/editable/jquery.jeditable.js');
$this->view->assign('infos', $infos);
}
}
}
/**
* Sauvegarde de la liasse saisie
*/
public function liassesaveAction()
public function liassesaveAction()
{
$this->_helper->layout()->disableLayout();
//Renvoyer flux json STATUS : OK ou ERR, MESSAGE : TEXTE, POSTE : ARRAY ou vide
@ -1669,14 +1675,14 @@ class SaisieController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout();
$dep = new Application_Model_TabDepartements();
$sql = $dep->select();
$rows = $dep->fetchAll($sql);
if ( count($rows)>0 ) {
foreach ($rows as $item) {
$depListe[] = array(
'num' => $item->numdep,
'lib' => $item->libdep,
);
}
$rows = $dep->fetchAll($sql);
if ( count($rows)>0 ) {
foreach ($rows as $item) {
$depListe[] = array(
'num' => $item->numdep,
'lib' => $item->libdep,
);
}
}
$this->view->assign('depListe', $depListe);
$this->view->assign('countries', $this->countries);
@ -1872,9 +1878,9 @@ class SaisieController extends Zend_Controller_Action
if($params['transfer'] && ($params['MajMin'] == 'T' || $params['MajMin'] == 'F'))
{
$liens = $ws->getLiensById($idPar);
$liens = $ws->getLiensById($idPar);
$participations = $liens->participations->item;
if (count($participations)>0) {
$ws->setLienChange('tupfusion', $idPar, $idAct);
}
@ -2071,12 +2077,12 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getSaisieBourse($isin);
$infos = json_decode($result, true);
$dateFields = array(
'dateIntroduction',
'dateIntroYmd',
'dateRadiation',
'dateNbTitres',
'dateDerAG');
$dateFields = array(
'dateIntroduction',
'dateIntroYmd',
'dateRadiation',
'dateNbTitres',
'dateDerAG');
if ( $infos === null ) {
$this->view->assign('error', $result);
@ -2244,21 +2250,21 @@ class SaisieController extends Zend_Controller_Action
if ($items['PpPm']=='PM') {
$this->view->assign('nom', $items['RS']);
} else {
$dep = new Application_Model_TabDepartements();
$sql = $dep->select();
$rows = $dep->fetchAll($sql);
if ( count($rows)>0 ) {
foreach ($rows as $item) {
$depListe[] = array(
'num' => $item->numdep,
'lib' => $item->libdep,
$dep = new Application_Model_TabDepartements();
$sql = $dep->select();
$rows = $dep->fetchAll($sql);
if ( count($rows)>0 ) {
foreach ($rows as $item) {
$depListe[] = array(
'num' => $item->numdep,
'lib' => $item->libdep,
);
if ($item->numdep == $items['naissance_dept_pays']) {
$this->view->assign('naissance_dept_pays', 'FRA');
$this->view->assign('naissance_dept', $item->numdep);
}
}
}
}
}
}
$this->view->assign('depListe', $depListe);
$this->view->assign('nom', $items['nom']);
}
@ -2320,19 +2326,19 @@ class SaisieController extends Zend_Controller_Action
$request = $this->getRequest();
$id = $request->getParam('idFiche', null);
$infos = array ('delete' => '1');
$ws = new WsScores();
if ($id===null) {
$siren = $request->getParam('siren');
$result = $ws->searchLienRef($siren, 'siren');
if (count($result->item)>0) {
foreach ($result->item as $item) {
$id = $item->id;
break;
}
}
$ws = new WsScores();
if ($id===null) {
$siren = $request->getParam('siren');
$result = $ws->searchLienRef($siren, 'siren');
if (count($result->item)>0) {
foreach ($result->item as $item) {
$id = $item->id;
break;
}
}
}
if ( $request->isPost() ) {
@ -2356,7 +2362,7 @@ class SaisieController extends Zend_Controller_Action
public function scorecutoffAction()
{
$ws = new WsScores();
$ws = new WsScores();
$user = new Scores_Utilisateur();
$request = $this->getRequest();
@ -2413,22 +2419,22 @@ class SaisieController extends Zend_Controller_Action
if ( $request->isPost() ) {
// check values one more time
$paramlist = array(
'siren' => 'Siren',
'encours' => 'Encours',
'scoreSolv' => 'Indiscore',
'scoreDir' => 'Score dirigeance',
'scoreConf' => 'Score de conformité',
$paramlist = array(
'siren' => 'Siren',
'encours' => 'Encours',
'scoreSolv' => 'Indiscore',
'scoreDir' => 'Score dirigeance',
'scoreConf' => 'Score de conformité',
'remarque' => 'Remarque',
'paiement' => 'Information de paiement',
);
foreach ($paramlist as $item => $val) {
if ( !isset($params[$item]) ) {
$message .= "Valeur $val vide !<br/>";
}
if ( $params['encours']<0 || $params['encours']>500 ) {
$message = "Encours : Erreur borne";
}
'paiement' => 'Information de paiement',
);
foreach ($paramlist as $item => $val) {
if ( !isset($params[$item]) ) {
$message .= "Valeur $val vide !<br/>";
}
if ( $params['encours']<0 || $params['encours']>500 ) {
$message = "Encours : Erreur borne";
}
}
// end checking values
@ -2483,7 +2489,7 @@ class SaisieController extends Zend_Controller_Action
) , 'default', true));
}
$this->view->assign('getcutoff', $getcutoff);
$this->view->assign('siren', $siren);
$this->view->assign('typescore', $user->getTypeScore());
@ -2492,11 +2498,11 @@ class SaisieController extends Zend_Controller_Action
public function citysearchAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->layout()->disableLayout();
$cpVille = $this->getRequest()->getParam('cpville', null);
$output = array();
$output = array();
if ( null !== $cpVille) {
$city = new Application_Model_City();
$sql = $city->select('code, libelle');
@ -2505,39 +2511,39 @@ class SaisieController extends Zend_Controller_Action
} else {
$sql->where('libelle LIKE ?', "%$cpVille%");
}
$sql->limit(20);
$rows = $city->fetchAll($sql);
if ( count($rows)>0 ) {
foreach ($rows as $item) {
$output[] = array(
'label' => str_pad($item->code, 5, 0, STR_PAD_LEFT).": ".$item->libelle,
'value' => str_pad($item->code, 5, 0, STR_PAD_LEFT),
);
}
}
$sql->limit(20);
$rows = $city->fetchAll($sql);
if ( count($rows)>0 ) {
foreach ($rows as $item) {
$output[] = array(
'label' => str_pad($item->code, 5, 0, STR_PAD_LEFT).": ".$item->libelle,
'value' => str_pad($item->code, 5, 0, STR_PAD_LEFT),
);
}
}
}
$this->view->assign('output', $output);
}
public function codvoieAction()
{
$this->_helper->layout()->disableLayout();
$codvoie = $this->getRequest()->getParam('codvoie', null);
$output = array();
public function codvoieAction()
{
$this->_helper->layout()->disableLayout();
$codvoie = $this->getRequest()->getParam('codvoie', null);
$output = array();
if ( null !== $codvoie) {
foreach($this->codVoie as $key=>$val){
if (stripos($key, $codvoie)!==false || stripos($val, $codvoie)!==false){
$output[] = array(
'label' => $key.": ".$val,
'value' => $key
$output[] = array(
'label' => $key.": ".$val,
'value' => $key
);
}
}
}
$this->view->assign('output', $output);
}
}
$this->view->assign('output', $output);
}
/**
@ -2553,8 +2559,8 @@ class SaisieController extends Zend_Controller_Action
$siret = $request->getParam('siret');
$siren = substr($siret, 0, 9);
$nic = substr($siret, 9, 5);
$ws = new WsScores();
$ws = new WsScores();
switch ($mode) {
case 'add':
@ -2575,23 +2581,23 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('mode', $mode);
$this->view->assign('id', $id);
$this->view->assign('siren', $siren);
$this->view->assign('nic', $nic);
$this->view->assign('nic', $nic);
}
/**
* Sauvegarder les modifications des dirigeants oppérationnels
*/
public function diropsaveAction()
{
/**
* Sauvegarder les modifications des dirigeants oppérationnels
*/
public function diropsaveAction()
{
$this->_helper->layout()->disableLayout();
$params = $this->getRequest()->getParams();
$message = '';
$newDate = '0000-00-00';
if (trim($params['naiss_date']) != '') {
$date = new Zend_Date($params['naiss_date'], 'dd/MM/yyyy');
$newDate = $date->toString('yyyy-MM-dd');
if (trim($params['naiss_date']) != '') {
$date = new Zend_Date($params['naiss_date'], 'dd/MM/yyyy');
$newDate = $date->toString('yyyy-MM-dd');
}
$infos = array(
@ -2611,25 +2617,25 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores();
if($params['mode'] == 'add'){
$message = $this->view->translate('Ajout');
} else if ($params['mode'] == 'edit') {
$message = $this->view->translate('Edition');
} else if ($params['mode'] == 'del') {
$message = $this->view->translate('Suppression');
if($params['mode'] == 'add'){
$message = $this->view->translate('Ajout');
} else if ($params['mode'] == 'edit') {
$message = $this->view->translate('Edition');
} else if ($params['mode'] == 'del') {
$message = $this->view->translate('Suppression');
}
$result = $ws->setDirigeantsOp(json_encode($infos), $params['mode'], $params['id']);
if ($result>0) {
$message = $message.' '.$this->view->translate('a été réussi!');
} else if ($result===0) {
$message = $message.' '.$this->view->translate('n\'a pas été réussi!');
if ($result>0) {
$message = $message.' '.$this->view->translate('a été réussi!');
} else if ($result===0) {
$message = $message.' '.$this->view->translate('n\'a pas été réussi!');
} else {
$message = $result;
}
$this->view->assign('message', $message);
}
$this->view->assign('message', $message);
}
/**

View File

@ -40,6 +40,15 @@
</td>
</tr>
<?php }?>
<?php if (0 < $this->exportObjet->TOP_CONFIDENTIEL) : ?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2">
<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
Ce bilan est confidentiel.
</td>
</tr>
<?php endif ?>
<?php if ( $this->champType == 'S' ) {?>
<tr>
<td colspan="3">

View File

@ -31,12 +31,13 @@ span.poste input { width:50px; }
<h2>Liasse</h2>
<div class="paragraph">
<?php if ($this->infos) {?>
<?php if ($this->infos) { ?>
<div class="content">
<?php
$params = array(
'ancres' => $this->ancres,
'typeBilan' => $this->typeBilan,
'confidentiel' => $this->confidentiel,
'unite' => $this->unite,
'dateCloture' => $this->dateCloture,
'dureeMois'=> $this->dureeMois,

View File

@ -3,6 +3,10 @@
<label>Type de bilan</label>
<span id="typeBilan"><?=$this->typeBilan?></span>
</div>
<div class="clearfix">
<label>Confidentiel</label>
<input id="confidentiel" class="confidentiel" value="<?=$this->confidentiel?>">
</div>
<div class="clearfix">
<label>Valeurs exprimées en </label>
<span id="unit" class="unit editable"><?=$this->unite?></span>&nbsp;&euro;

View File

@ -3,6 +3,10 @@
<label>Type de bilan</label>
<span id="typeBilan" class="editable"><?=$this->typeBilan?></span>
</div>
<div class="clearfix">
<label>Confidentiel</label>
<input id="confidentiel" class="confidentiel" value="<?=$this->confidentiel?>">
</div>
<div class="clearfix">
<label>Valeurs exprimées en </label>
<span id="unit" class="unit editable"><?=$this->unite?></span>&nbsp;&euro;

View File

@ -405,24 +405,24 @@ class WsScores
}
}
public function getCatalogCity($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns = $columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getCity($params);
return $reponse->getCityResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getCatalogCity($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns = $columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getCity($params);
return $reponse->getCityResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getCatalogLegalForm($id, $columns)
@ -501,42 +501,42 @@ class WsScores
}
}
/**
* Get Score Cut Off
* @param string $siren
* @return Cutoff values or False
*/
public function getScoreCutoff($siren)
{
/**
* Get Score Cut Off
* @param string $siren
* @return Cutoff values or False
*/
public function getScoreCutoff($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getScoreCutoff($params);
return $reponse->getScoreCutoffResult;
} catch (SoapFault $fault) {
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getScoreCutoff($params);
return $reponse->getScoreCutoffResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
return $fault->faultstring;
}
}
/**
* Delete Score Cut Off
* @param string $siren
* @return boolean
*/
public function delScoreCutoff($siren)
{
/**
* Delete Score Cut Off
* @param string $siren
* @return boolean
*/
public function delScoreCutoff($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->delScoreCutoff($params); //change name when webservice is ready
return $reponse->delScoreCutoffResult; //change name when webservice is ready
} catch (SoapFault $fault) {
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->delScoreCutoff($params); //change name when webservice is ready
return $reponse->delScoreCutoffResult; //change name when webservice is ready
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
return $fault->faultstring;
}
}
public function searchLogin($idClient, $query)
@ -884,22 +884,22 @@ class WsScores
$params->type = $type;
$params->libelle = $libelle;
$params->date = $date;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setActeAsso($params);
return $reponse->setActeAssoResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
$client = $this->loadClient('saisie');
try {
$reponse = $client->setActeAsso($params);
return $reponse->setActeAssoResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setBilan($siren, $originalDateCloture, $originalTypeBilan, $unite, $dateCloture, $dureeMois, $dateCloturePre, $dureeMoisPre, $typeBilan, $postes, $step = 'normal')
public function setBilan($siren, $originalDateCloture, $originalTypeBilan, $unite, $dateCloture, $dureeMois, $dateCloturePre, $dureeMoisPre, $typeBilan, $postes, $step = 'normal', $confidentiel=0)
{
$params = new stdClass();
$params->siren = $siren;
@ -913,6 +913,7 @@ class WsScores
$params->data->typeBilan = $typeBilan;
$params->data->postes = $postes;
$params->step = $step;
$params->confidentiel = $confidentiel;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setBilan($params);
@ -943,14 +944,14 @@ class WsScores
$params->identifiant = $identifiant;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('pieces');
try {
$reponse = $client->getBilans($params);
return $reponse->getBilansResult;
$client = $this->loadClient('pieces');
try {
$reponse = $client->getBilans($params);
return $reponse->getBilansResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
@ -964,21 +965,21 @@ class WsScores
*/
public function getPiecesBilan($siren, $type, $diffusion, $dateCloture, $reference = '')
{
$params = new stdClass();
$params = new stdClass();
$params->identifiant = $siren;
$params->dateCloture = $dateCloture;
$params->type = $type;
$params->diffusion = $diffusion;
$params->reference = $reference;
$client = $this->loadClient('pieces');
try {
$client = $this->loadClient('pieces');
try {
$reponse = $client->getBilan($params);
$this->logger->info(print_r($reponse,1));
return $reponse->getBilanResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
$this->logger->info(print_r($reponse,1));
return $reponse->getBilanResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
@ -1103,15 +1104,15 @@ class WsScores
*/
public function getUser($login)
{
$params = new stdClass();
$params->login = $login;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getUser($params);
return $reponse->getUserResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
$params = new stdClass();
$params->login = $login;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getUser($params);
return $reponse->getUserResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
@ -1170,17 +1171,17 @@ class WsScores
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('interne');
try {
$reponse = $client->getGroupeInfos($params);
return $reponse->getGroupeInfosResult;
$client = $this->loadClient('interne');
try {
$reponse = $client->getGroupeInfos($params);
return $reponse->getGroupeInfosResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('Error')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
}
@ -1196,7 +1197,7 @@ class WsScores
$filename.= '-0';
if ($stopAtIsin === true) {
$filename.= '-1';
}
}
if ($this->cacheWrite) {
$cache = new Cache($filename);
@ -1214,7 +1215,7 @@ class WsScores
try {
$reponse = $client->getGroupesArbo($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->deletefile();
$cache->setBlock($reponse->getGroupesArboResult);
}
return $reponse->getGroupesArboResult;
@ -1913,28 +1914,28 @@ class WsScores
}
}
/**
* getListeDepartements
* Liste des départements
/**
* getListeDepartements
* Liste des départements
*/
public function getCatalogDepartements($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns = $columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getDepartements($params);
return $reponse->getDepartementsResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getCatalogDepartements($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns = $columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getDepartements($params);
return $reponse->getDepartementsResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
@ -2185,11 +2186,11 @@ class WsScores
return false;
}
}
}
}
public function getAnnoncesNum($siren)
{
$filename = 'annoncesnum-'.$siren;
$filename = 'annoncesnum-'.$siren;
if ($this->cacheWrite) {
$cache = new Cache($filename);
@ -2197,26 +2198,26 @@ class WsScores
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesNum($params);
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesNum($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->deletefile();
$cache->setBlock($reponse->getAnnoncesNumResult);
}
return $reponse->getAnnoncesNumResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
return $reponse->getAnnoncesNumResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getAnnoncesBalo($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$filename = 'annoncesbalo-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
$filename = 'annoncesbalo-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
if ($this->cacheWrite) {
$cache = new Cache($filename);
@ -2224,30 +2225,30 @@ class WsScores
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$params = new stdClass();
$params->siren = $siren;
$params->idAnn = $idAnn;
$params->filtre = $filtre;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesBalo($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->deletefile();
$cache->setBlock($reponse->getAnnoncesBaloResult);
}
return $reponse->getAnnoncesBaloResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
return $reponse->getAnnoncesBaloResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getAnnoncesBoamp($siren, $idAnn=null, $filtre = null, $position=0, $nbRep=20)
{
$filename = 'annoncesboamp-'.$siren.'-'.$filtre.'-'.$position.'-'.$nbRep;
public function getAnnoncesBoamp($siren, $idAnn=null, $filtre = null, $position=0, $nbRep=20)
{
$filename = 'annoncesboamp-'.$siren.'-'.$filtre.'-'.$position.'-'.$nbRep;
if ($idAnn !== null) {
$filename = 'annoncesboamp-'.$siren.'-'.$filtre.'-'.$idAnn.'-'.$position.'-'.$nbRep;
@ -2259,38 +2260,38 @@ class WsScores
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$params = new stdClass();
$params->siren = $siren;
$params->idAnn = $idAnn;
$params->filtre = null;
if (!empty($filtre) && in_array($filtre,array('A','M'))) {
$filtreStruct = new stdClass();
$filtreStruct->key = 'type';
$filtreStruct->key = 'type';
$filtreStruct->value = $filtre;
$params->filtre[] = $filtreStruct;
}
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesBoamp($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->deletefile();
$cache->setBlock($reponse->getAnnoncesBoampResult);
}
return $reponse->getAnnoncesBoampResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
return $reponse->getAnnoncesBoampResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getAnnoncesAsso($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$filename = 'annoncesasso-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
public function getAnnoncesAsso($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$filename = 'annoncesasso-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
if ($this->cacheWrite) {
$cache = new Cache($filename);
@ -2298,30 +2299,30 @@ class WsScores
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$params = new stdClass();
$params->siren = $siren;
$params->idAnn = $idAnn;
$params->filtre = $filtre;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesAsso($params);
$params->filtre = $filtre;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesAsso($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->deletefile();
$cache->setBlock($reponse->getAnnoncesAssoResult);
}
return $reponse->getAnnoncesAssoResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
return $reponse->getAnnoncesAssoResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getAnnoncesLegales($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$filename = 'annonceslegales-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
public function getAnnoncesLegales($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$filename = 'annonceslegales-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
if ($this->cacheWrite) {
$cache = new Cache($filename);
@ -2329,28 +2330,28 @@ class WsScores
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$params = new stdClass();
$params->siren = $siren;
$params->idAnn = $idAnn;
$params->filtre = $filtre;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesLegales($params);
$this->logger->info(print_r($reponse,1));
$params->filtre = $filtre;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesLegales($params);
$this->logger->info(print_r($reponse,1));
if ($this->cacheWrite) {
$cache->deletefile();
$cache->deletefile();
$cache->setBlock($reponse->getAnnoncesLegalesResult);
}
return $reponse->getAnnoncesLegalesResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
return $reponse->getAnnoncesLegalesResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getAnnonces
* @param string $siren
@ -2684,29 +2685,29 @@ class WsScores
}
}
/**
* setDirigeantsOp
* @param array $infos
*/
public function setDirigeantsOp($infos, $mode, $id)
{
$params = new stdClass();
/**
* setDirigeantsOp
* @param array $infos
*/
public function setDirigeantsOp($infos, $mode, $id)
{
$params = new stdClass();
$params->infos = $infos;
$params->mode = $mode;
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setDirigeantsOp($params);
return $reponse->setDirigeantsOpResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
$params->mode = $mode;
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setDirigeantsOp($params);
return $reponse->setDirigeantsOpResult;
} catch (SoapFault $fault) {
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
@ -3214,24 +3215,24 @@ class WsScores
}
}
/**
* getScoreHistorique pour les derniers 5 ans
* @param string $siret
* @param string $type
*/
public function getScoresHisto($siret, $type = 'indiscore')
{
$params = new stdClass();
$params->siret = $siret;
$params->type = $type;
try {
$client = $this->loadClient('interne');
$reponse = $client->getScoresHisto($params);
return $reponse->getScoresHistoResult;
/**
* getScoreHistorique pour les derniers 5 ans
* @param string $siret
* @param string $type
*/
public function getScoresHisto($siret, $type = 'indiscore')
{
$params = new stdClass();
$params->siret = $siret;
$params->type = $type;
try {
$client = $this->loadClient('interne');
$reponse = $client->getScoresHisto($params);
return $reponse->getScoresHistoResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
@ -3327,25 +3328,25 @@ class WsScores
/**
* getCategory
*/
public function getCategory()
{
$filename = 'category';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock('category');
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->getCategory();
$cache->deletefile();
$cache->setBlock($reponse->getCategoryResult);
return $reponse->getCategoryResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
//Placer exception pour affichage message
return false;
}
public function getCategory()
{
$filename = 'category';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock('category');
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->getCategory();
$cache->deletefile();
$cache->setBlock($reponse->getCategoryResult);
return $reponse->getCategoryResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
//Placer exception pour affichage message
return false;
}
}
/**