ws-2.0 : getAnnonceCollecte, supprAnnonceCollecte, dupliqueAnnonceCollecte
This commit is contained in:
parent
5608237ffc
commit
50e1d38273
@ -4,38 +4,38 @@ header('Content-Type: text/html; charset='.CHARSET);
|
||||
?>
|
||||
<fieldset>
|
||||
<legend>Liquidateur / Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][0][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][0][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir1Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][0][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][0][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir][0][Dom]" size="60" maxlength="255" value="" />
|
||||
</fieldset>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeant 2</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeant 3</a></p>
|
||||
|
||||
<fieldset id="NouveauDirigeant2">
|
||||
<legend>Nouveau dirigeant 2</legend>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir][1][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][1][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir2Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][1][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="NouveauDirigeant3">
|
||||
<legend>Nouveau dirigeant 3</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][2][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][2][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren</label>
|
||||
<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
|
||||
<input type="text" name="jugement[nouvDir][2][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][2][Nom]" size="15" maxlength="40"><br/>
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir3Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][2][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
|
@ -3,40 +3,40 @@ include_once(realpath(dirname(__FILE__).'/constantes.php'));
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
?>
|
||||
<fieldset>
|
||||
<legend>Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>
|
||||
<legend>Liquidateur / Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][0][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][0][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir1Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][0][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][0][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir][0][Dom]" size="60" maxlength="255" value="" />
|
||||
</fieldset>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeants2</a></p>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeants3</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeant 2</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeant 3</a></p>
|
||||
|
||||
<fieldset id="NouveauDirigeant2">
|
||||
<legend>Nouveau dirigeant 2</legend>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir][1][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][1][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir2Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][1][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="NouveauDirigeant3">
|
||||
<legend>Nouveau dirigeant 3</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][2][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][2][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren</label>
|
||||
<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
|
||||
<input type="text" name="jugement[nouvDir][2][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][2][Nom]" size="15" maxlength="40"><br/>
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir3Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][2][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<label>Complément, huissier, opposition, etc...</label>
|
||||
|
@ -40,56 +40,41 @@ if ($reponse!=false){
|
||||
|
||||
<fieldset>
|
||||
<legend>Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label>
|
||||
<select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label>
|
||||
<select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][0][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][0][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label>
|
||||
<input type="text" name="jugement[nouvDir1Dom]"
|
||||
size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][0][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][0][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir][0][Dom]" size="60" maxlength="255" value="" />
|
||||
</fieldset>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','block');">
|
||||
Nouveau Dirigeants2</a></p>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','block');">
|
||||
Nouveau Dirigeants3</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeant 2</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeant 3</a></p>
|
||||
|
||||
<fieldset id="NouveauDirigeant2">
|
||||
<legend>Nouveau dirigeant 2</legend>
|
||||
<label>Fonction:</label>
|
||||
<select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label>
|
||||
<select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir][1][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][1][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir2Dom]"
|
||||
size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','none');">
|
||||
Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][1][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="NouveauDirigeant3">
|
||||
<legend>Nouveau dirigeant 3</legend>
|
||||
<label>Fonction :</label>
|
||||
<select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label>
|
||||
<select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][2][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][2][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren</label>
|
||||
<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
|
||||
<input type="text" name="jugement[nouvDir][2][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][2][Nom]" size="15" maxlength="40"><br/>
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir3Dom]"
|
||||
size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','none');">
|
||||
Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][2][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<label>Complément, huissier, opposition, etc...</label>
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="255" value="" />
|
||||
|
@ -1,129 +1,152 @@
|
||||
<?php
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
switch ($subaction) {
|
||||
case 'deleteDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Êtes-vous sur de vouloir supprimer l'annonce <?=$idan?> ?
|
||||
</div>
|
||||
<form name="deleteDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
<input type="hidden" name="siret" value="<?=$siret?>" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'copyDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Affecte l'annonce <?=$idan?> de <?=$siret?> sur un nouveau siren.
|
||||
</div>
|
||||
<br/>
|
||||
<form name="copyDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
Siren / Siret : <input type="text" name="siret" value="" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'editDialog':
|
||||
$inEditDialog = true;
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
$siren = substr($siret, 0, 9);
|
||||
$nic = substr($siret, 10, 5);
|
||||
if (empty($idan) == false) {
|
||||
$idanResult = scoresws_getAnnonceCollecte($idan, $siret);
|
||||
// Limitation des événements
|
||||
$eventLimits = array('5500');
|
||||
foreach ($eventLimits as $eventLimit) {
|
||||
if (in_array($eventLimit, $idanResult['even']) &&
|
||||
$idanResult['source'] == 'JT') {
|
||||
print '<link rel="stylesheet" type="text/css" media="all"'.
|
||||
' href="css/saisie.css"/>';
|
||||
print '<script type="text/javascript" src="js/saisieajax.js">'.
|
||||
'</script>';
|
||||
print '<form id="saisie" name="saisie" action='.
|
||||
'"/?page=saisieajax&q=annonces/edit" method="post">';
|
||||
print '<input type="hidden" name="siret" value="'.$siret.'"/>';
|
||||
print '<input type="hidden" name="idan" value="'.$idan.'">';
|
||||
// Mapper idanResult dans le tableau de saisie
|
||||
require_once 'common/dates.php';
|
||||
$saisie =
|
||||
array('source' => isset($_SESSION['source']) ?
|
||||
$_SESSION['source'] : $idanResult['source'],
|
||||
'dateParution' => isset($_SESSION['dateParution']) ?
|
||||
$_SESSION['dateParution'] :
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y',
|
||||
substr($idanResult['dateSource'],
|
||||
0, 10)),
|
||||
'numParution' => isset($_SESSION['numParution']) ?
|
||||
$_SESSION['numParution'] : '',
|
||||
'dateJugement' =>
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y',
|
||||
$idanResult['dateEffetFinP']),
|
||||
'tribunal' => $idanResult['tribunal'],
|
||||
'even' => $idanResult['even'],
|
||||
'eventNum' => $eventLimit,
|
||||
'comp' => $idanResult['complement'],
|
||||
'montant' => $idanResult['montant'],
|
||||
'dateFinPeriode' =>
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y',
|
||||
$idanResult['dateJugement']));
|
||||
$intervenants = array();
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$intervenants[$i] =
|
||||
array('type' => $idanResult['inter'.($i+1).'type'],
|
||||
'id' => $idanResult['inter'.($i+1).'id'],
|
||||
'nom' => $idanResult['inter'.($i+1).'nom']);
|
||||
}
|
||||
require_once realpath(dirname(__FILE__)).'/constantes.php';
|
||||
require_once realpath(dirname(__FILE__)).
|
||||
'/saisie_form_event.php';
|
||||
print '</form>';
|
||||
print '<script>';
|
||||
print "$('form#saisie').bind('submit', function() {
|
||||
var options = {
|
||||
target: '#saisie',
|
||||
beforeSubmit: function(formData){},
|
||||
success: function(data) {
|
||||
$('#saisie').html(data);
|
||||
}
|
||||
};
|
||||
$(this).ajaxSubmit(options);
|
||||
return false;
|
||||
});";
|
||||
print '</script>';
|
||||
break;
|
||||
} else {
|
||||
$message = "Source : ".$idanResult['source']."<br/>";
|
||||
$message .= "Evénement(s) non éditable : <br/>";
|
||||
foreach ($idanResult['even'] as $code => $event) {
|
||||
$message .= $code." - ".$event."<br/>";
|
||||
}
|
||||
print $message;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = $_REQUEST['siret'];
|
||||
print scoresws_supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'copy':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = str_replace(' ', '', $_REQUEST['siret']);
|
||||
print scoresws_dupliqueAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'edit':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_save.php';
|
||||
print saisie_save($siret, '', $tabInfo);
|
||||
print '<br/>';
|
||||
print scoresws_supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
function getAnnonceCollecte($idan, $siret = ''){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getAnnonceCollecte($idan, $siret);
|
||||
if ($reponse !== false && $reponse->error->errnum != 0){
|
||||
return $reponse->result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function supprAnnonceCollecte($idan, $siret = ''){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->supprAnnonceCollecte($idan, $siret);
|
||||
if ( reponse!==false && $reponse->error->errnum == 0 ){
|
||||
$output = 'Annonce '.$idan.' supprimé !';
|
||||
} elseif ( $reponse!==false && $reponse->error->errnum != 0 ) {
|
||||
$output = 'Erreur lors de la suppression.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function dupliqueAnnonceCollecte($idan, $siret){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->dupliqueAnnonceCollecte($idan, $siret);
|
||||
if ( $reponse!==false && $reponse->error->errnum == 0 ){
|
||||
$output = 'Annonce '.$idan.' dupliqué sur '.$siret.'!';
|
||||
} elseif ( $reponse!==false && $reponse->error->errnum != 0 ) {
|
||||
$output = 'Erreur lors de la duplication.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
switch ( $subaction ) {
|
||||
case 'deleteDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Êtes-vous sur de vouloir supprimer l'annonce <?=$idan?> ?
|
||||
</div>
|
||||
<form name="deleteDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
<input type="hidden" name="siret" value="<?=$siret?>" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'copyDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Affecte l'annonce <?=$idan?> de <?=$siret?> sur un nouveau siren.
|
||||
</div>
|
||||
<br/>
|
||||
<form name="copyDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
Siren / Siret : <input type="text" name="siret" value="" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'editDialog':
|
||||
$inEditDialog = true;
|
||||
$idan = $params[2];
|
||||
$siret = $params[3]; FB::log($siret, 'siret');
|
||||
$siren = substr($siret,0,9); FB::log($siren, 'siren');
|
||||
$nic = substr($siret,10,5);
|
||||
if ( !empty($idan) ) {
|
||||
$idanResult = getAnnonceCollecte($idan, $siret);
|
||||
FB::log($idanResult, 'result');
|
||||
//Limitation des événements
|
||||
$eventLimits = array('5500');
|
||||
foreach ( $eventLimits as $eventLimit ) {
|
||||
if ( in_array($eventLimit, $idanResult['even']) && $idanResult['source']=='JT' ) {
|
||||
echo '<link rel="stylesheet" type="text/css" media="all" href="css/saisie.css"/>';
|
||||
echo '<script type="text/javascript" src="js/saisieajax.js"></script>';
|
||||
echo '<form id="saisie" name="saisie" action="/?page=saisieajax&q=annonces/edit" method="post">';
|
||||
echo '<input type="hidden" name="siret" value="'.$siret.'"/>';
|
||||
echo '<input type="hidden" name="idan" value="'.$idan.'">';
|
||||
//Mapper idanResult dans le tableau de saisie
|
||||
require_once 'common/dates.php';
|
||||
$saisie = array(
|
||||
'source' => isset($_SESSION['source']) ? $_SESSION['source'] : $idanResult->source,
|
||||
'dateParution' => isset($_SESSION['dateParution']) ? $_SESSION['dateParution'] :
|
||||
WDate::dateT('Y-m-d', 'd/m/Y', substr($idanResult->dateSource,0,10)),
|
||||
'numParution' => isset($_SESSION['numParution']) ? $_SESSION['numParution'] : '',
|
||||
'dateJugement' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult['dateEffetFinP']),
|
||||
'tribunal' => $idanResult->tribunal,
|
||||
'even' => $idanResult->even,
|
||||
'eventNum' => $eventLimit,
|
||||
'comp' => $idanResult->complement,
|
||||
'montant' => $idanResult->montant,
|
||||
'dateFinPeriode' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult->dateJugement),
|
||||
);
|
||||
$intervenants = array();
|
||||
for ( $i=0 ; $i<3 ; $i++ ) {
|
||||
$intervenants[$i] = array(
|
||||
'type' => $idanResult->${'inter'.($i+1).'type'},
|
||||
'id' => $idanResult->${'inter'.($i+1).'id'},
|
||||
'nom' => $idanResult->${'inter'.($i+1).'nom'},
|
||||
);
|
||||
}
|
||||
require_once realpath(dirname(__FILE__)).'/constantes.php';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
echo '</form>';
|
||||
echo '<script>';
|
||||
echo "$('form#saisie').bind('submit', function(){
|
||||
var options = {
|
||||
target: '#saisie',
|
||||
beforeSubmit: function(formData){},
|
||||
success: function(data){
|
||||
$('#saisie').html(data);
|
||||
}
|
||||
};
|
||||
$(this).ajaxSubmit(options);
|
||||
return false;
|
||||
});";
|
||||
echo '</script>';
|
||||
break;
|
||||
} else {
|
||||
$message = "Source : ".$idanResult->source."<br/>";
|
||||
$message.= "Evénement(s) non éditable : <br/>";
|
||||
foreach($idanResult->even as $item){
|
||||
$message.= $item->CodeEven." - ".$item->LibEven."<br/>";
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = $_REQUEST['siret'];
|
||||
echo supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'copy':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = str_replace(' ','',$_REQUEST['siret']);
|
||||
echo dupliqueAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'edit':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_save.php';
|
||||
echo saisie_save($siret, '', $tabInfo);
|
||||
echo '<br/>';
|
||||
echo supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
}
|
@ -72,7 +72,7 @@ if (substr($etab->Web, 0, 7) != 'http://') {
|
||||
value="<?=trim($etab->Isin)?>" />
|
||||
<label>Activité déclarée de l'entreprise</label>
|
||||
<textarea name="frmSaisie[activite]" rows="5" cols="40">
|
||||
<?=$etab->Activite?>
|
||||
<?=$etab->Activite?>
|
||||
</textarea>
|
||||
|
||||
<label>Capital Montant</label>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
function saisie_save($siret, $idEntreprise, $tabInfo)
|
||||
{
|
||||
global $client;
|
||||
// Récupération des infos soumise par formulaires
|
||||
if (isset($_REQUEST['frmSaisie']))
|
||||
$tabSaisie = $_REQUEST['frmSaisie'];
|
||||
@ -21,9 +20,11 @@ function saisie_save($siret, $idEntreprise, $tabInfo)
|
||||
$etabnic = $_REQUEST['etabnic'];
|
||||
|
||||
// Vente et Cession evénement 5500
|
||||
foreach($perimetreVente as $k => $p){
|
||||
if ( $p=='-' ){
|
||||
array_splice($perimetreVente, $k, 1);
|
||||
if ( count($perimetreVente)>0 ){
|
||||
foreach($perimetreVente as $k => $p){
|
||||
if ( $p=='-' ){
|
||||
array_splice($perimetreVente, $k, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($perimetreVente) && count($perimetreVente) > 0) {
|
||||
@ -78,32 +79,100 @@ function saisie_save($siret, $idEntreprise, $tabInfo)
|
||||
}
|
||||
}
|
||||
|
||||
// Traitement des chaînes de caractères
|
||||
require 'i18n/cleanchar.php';
|
||||
$tabSaisie = cleanstring_deep($tabSaisie);
|
||||
$tabJugement = cleanstring_deep($tabJugement);
|
||||
$tabActionna = cleanstring_deep($tabActionna);
|
||||
$tabParticip = cleanstring_deep($tabParticip);
|
||||
|
||||
$tabInfos =
|
||||
array('identite' => $tabSaisie,
|
||||
'jugement' => $tabJugement,
|
||||
'actionnaire' => $tabActionna,
|
||||
'participation' => $tabParticip,
|
||||
'score' => $tabScore);
|
||||
$InfosEntrep = new stdClass();
|
||||
|
||||
$identite = new stdClass();
|
||||
$identite->isin = $tabSaisie['isin'];
|
||||
$identite->tel = $tabSaisie['tel'];
|
||||
$identite->fax = $tabSaisie['fax'];
|
||||
$identite->web = $tabSaisie['web'];
|
||||
$identite->mail = $tabSaisie['mail'];
|
||||
$identite->activite = $tabSaisie['activite'];
|
||||
$identite->sirenDoublon = $tabSaisie['sirenDoublon'];
|
||||
$identite->moisOppositionInsee = $tabSaisie['moisOppositionInsee'];
|
||||
$identite->domiciliataire = $tabSaisie['domiciliataire'];
|
||||
|
||||
$InfosEntrep->identite = $identite;
|
||||
|
||||
$jugement = new stdClass();
|
||||
$jugement->source = $tabJugement['source'];
|
||||
$jugement->dateJuge = $tabJugement['dateJuge'];
|
||||
$jugement->tribunal = $tabJugement['tribunal'];
|
||||
$jugement->even = $tabJugement['even'];
|
||||
$jugement->admin = $tabJugement['admin'];
|
||||
$jugement->mand = $tabJugement['mand'];
|
||||
$jugement->oppo = $tabJugement['oppo'];
|
||||
$jugement->dateParution = $tabJugement['dateParution'];
|
||||
$jugement->numParution = $tabJugement['numParution'];
|
||||
$jugement->actionsMt = $tabJugement['actionsMt'];
|
||||
$jugement->actionsNb = $tabJugement['actionsNb'];
|
||||
$jugement->nic = $tabJugement['nic'];
|
||||
$jugement->datePaie = $tabJugement['datePaie'];
|
||||
$jugement->dateFinPeriode = $tabJugement['dateFinPeriode'];
|
||||
$jugement->comp = $tabJugement['comp'];
|
||||
$jugement->nouvAdrCp = $tabJugement['nouvAdrCp'];
|
||||
$jugement->nouvAdr = $tabJugement['nouvAdr'];
|
||||
$jugement->nouvAdrVille = $tabJugement['nouvAdrVille'];
|
||||
$jugement->nouvActivite = $tabJugement['nouvActivite'];
|
||||
$jugement->nouvFJ = $tabJugement['nouvFJ'];
|
||||
|
||||
$tabDir = array();
|
||||
if ( count($tabJugement['nouvDir'])>0 ){
|
||||
foreach ( $tabJugement['nouvDir'] as $nouvDir ){
|
||||
$dir = new stdClass();
|
||||
$dir->Fonc = $nouvDir['Fonc'];
|
||||
$dir->Genre = $nouvDir['Genre'];
|
||||
$dir->Pre = $nouvDir['Pre'];
|
||||
$dir->Nom = $nouvDir['Nom'];
|
||||
$dir->Dom = $nouvDir['Dom'];
|
||||
$tabDir[] = $dir;
|
||||
}
|
||||
}
|
||||
$jugement->nouvDir = $tabDir;
|
||||
|
||||
$InfosEntrep->jugement = $jugement;
|
||||
|
||||
$actionnaire = new stdClass();
|
||||
$actionnaire->siren = $tabActionna['siren'];
|
||||
$actionnaire->pct = $tabActionna['pct'];
|
||||
$actionnaire->majMin = $tabActionna['majMin'];
|
||||
$actionnaire->dateMAJ = $tabActionna['dateMAJ'];
|
||||
$actionnaire->pays = $tabActionna['pays'];
|
||||
$actionnaire->nom = $tabActionna['nom'];
|
||||
|
||||
$InfosEntrep->actionnaire = $actionnaire;
|
||||
|
||||
$participation = new stdClass();
|
||||
$participation->siren = $tabParticip['siren'];
|
||||
$participation->pct = $tabParticip['pct'];
|
||||
$participation->majMin = $tabParticip['majMin'];
|
||||
$participation->dateMAJ = $tabParticip['dateMAJ'];
|
||||
$participation->pays = $tabParticip['pays'];
|
||||
$participation->nom = $tabParticip['nom'];
|
||||
|
||||
$InfosEntrep->participation = $participation;
|
||||
|
||||
$score = new stdClass();
|
||||
$score->encours = $tabScore['encours'];
|
||||
$score->scoreSolv = $tabScore['scoreSolv'];
|
||||
$score->scoreDir = $tabScore['scoreDir'];
|
||||
$score->scoreConf = $tabScore['scoreConf'];
|
||||
|
||||
$InfosEntrep->score = $score;
|
||||
|
||||
$message = 'Erreur lors de l\'enregistrement !';
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setInfosEntrep($siret, $idEntreprise, $tabInfos);
|
||||
$reponse = $ws->setInfosEntrep($siret, $idEntreprise, $InfosEntrep);
|
||||
if ($reponse!=false || $reponse->result!=false){
|
||||
$message = 'Informations mises à jour !';
|
||||
}
|
||||
|
||||
$tabSaisie =
|
||||
array('source' => $tabJugement['source'],
|
||||
'dateParution' => $tabJugement['dateParution'],
|
||||
'numParution' => $tabJugement['numParution']);
|
||||
$tabSaisie = array(
|
||||
'source' => $tabJugement['source'],
|
||||
'dateParution' => $tabJugement['dateParution'],
|
||||
'numParution' => $tabJugement['numParution']
|
||||
);
|
||||
|
||||
$_SESSION['saisie'] = $tabSaisie;
|
||||
|
||||
|
@ -16,6 +16,51 @@ class WsScores
|
||||
$this->password = $_SESSION['tabInfo']['password'];
|
||||
}
|
||||
}
|
||||
|
||||
public function getAnnonceCollecte($idan, $siret){
|
||||
$params = new stdClass;
|
||||
$params->idAnn = $idan;
|
||||
$params->siret = $siret;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getAnnonceCollecte($params);
|
||||
return $reponse->getAnnonceCollecteResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function supprAnnonceCollecte($idan, $siret){
|
||||
$params = new stdClass;
|
||||
$params->idAnn = $idan;
|
||||
$params->siret = $siret;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->supprAnnonceCollecte($params);
|
||||
return $reponse->supprAnnonceCollecteResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function dupliqueAnnonceCollecte($idan, $siret){
|
||||
$params = new stdClass;
|
||||
$params->idAnn = $idan;
|
||||
$params->siret = $siret;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->dupliqueAnnonceCollecte($params);
|
||||
return $reponse->dupliqueAnnonceCollecteResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDirigeants ( $siren, $histo=false ){
|
||||
$params = new stdClass;
|
||||
|
Loading…
Reference in New Issue
Block a user