Merge suppression et edition annonce, issue #0000258
This commit is contained in:
commit
e764897c59
@ -1,19 +1,11 @@
|
||||
<?php
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
|
||||
$tribunal = (isset($_REQUEST['tribunal'])? $_REQUEST['tribunal'] : '');
|
||||
$siren = (isset($_REQUEST['siren'])? $_REQUEST['siren'] : '');
|
||||
$nic = (isset($_REQUEST['nic'])? $_REQUEST['nic'] : '');
|
||||
|
||||
//Connection au webservice
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password'],
|
||||
));
|
||||
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
||||
$tribunal = (isset($_REQUEST['tribunal']) ? $_REQUEST['tribunal'] : '');
|
||||
$siren = (isset($_REQUEST['siren']) ? $_REQUEST['siren'] : '');
|
||||
$nic = (isset($_REQUEST['nic']) ? $_REQUEST['nic'] : '');
|
||||
}
|
||||
|
||||
//Sélection de la cour d'appel en fonction du tribunal
|
||||
require_once realpath(dirname(__FILE__)).'/../coursappel.php';
|
||||
@ -23,7 +15,7 @@ require_once realpath(dirname(__FILE__)).'/../field_opposition.php';
|
||||
<input type="text" maxlength="10" class="date" name="jugement[dateFinPeriode]" value="" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
<label>Montant de la vente</label>
|
||||
<input type="text" class="widthauto" name="jugement[montant]" size="10" maxlength="15" value=""/>
|
||||
<input type="text" class="widthauto" name="jugement[montant]" size="10" maxlength="15" value="<?=$saisie['montant']?>"/>
|
||||
<span class="left">en € sans les cents</span>
|
||||
|
||||
<label>Etablissement concerné</label>
|
||||
@ -31,17 +23,21 @@ require_once realpath(dirname(__FILE__)).'/../field_opposition.php';
|
||||
<option value="-">-</option>
|
||||
<?php
|
||||
try {
|
||||
FB::log($siren, 'Etab-Siren');
|
||||
$O = $client->getListeEtablissements($siren);
|
||||
$listEtablissements = $O['result'];
|
||||
foreach($listEtablissements as $etablissement)
|
||||
{
|
||||
$title = $siren.$etablissement['Nic'].' - '.$etablissement['Adresse'].' '.$etablissement['CP'].' '.$etablissement['Ville'];
|
||||
$value = $etablissement['Adresse'].' '.$etablissement['CP'].' '.$etablissement['Ville'].' ('.$etablissement['Nic'].')';
|
||||
foreach ( $listEtablissements as $etablissement ) {
|
||||
//Information etablissement
|
||||
$title = $siren.$etablissement['Nic'].' - '.$etablissement['Adresse'].' '.
|
||||
$etablissement['CP'].' '.$etablissement['Ville'];
|
||||
$value = $etablissement['Adresse'].' '.$etablissement['CP'].' '.
|
||||
$etablissement['Ville'].' ('.$etablissement['Nic'].')';
|
||||
$siege = '';
|
||||
if($etablissement['Siege']==1 && $etablissement['Actif']==1)
|
||||
{
|
||||
if ( $etablissement['Siege']==1 && $etablissement['Actif']==1 ) {
|
||||
$siege = ' (Siège Actif)';
|
||||
}
|
||||
//Sélection etablissement
|
||||
|
||||
echo '<option title="'.$title.$siege.'" value="'.$value.'">'.$title.$siege.'</option>';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
@ -74,4 +70,4 @@ try {
|
||||
</select>
|
||||
|
||||
<label>Complément, huissier, etc...</label>
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="900" value="" />
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="900" value="<?=$saisie['comp']?>" />
|
||||
|
@ -12,9 +12,9 @@ if($idMandataire != ''){
|
||||
$tabMandataires = $O['result'];
|
||||
$firephp->log($tabMandataires,'Edition - tabMandataires');
|
||||
}catch(SoapFault $fault){
|
||||
$firephp->log($fault, 'fault');
|
||||
$message = 'Une erreur est survenue durant la recherche de mandataire.';
|
||||
}
|
||||
//Mode ajout
|
||||
}else{
|
||||
$tabMandataires = $_REQUEST['tabMandataires'];
|
||||
}
|
||||
|
@ -31,16 +31,58 @@ switch ( $subaction ) {
|
||||
break;
|
||||
case 'editDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
if ( !empty($idan) ){
|
||||
$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']) ) {
|
||||
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.'"/>';
|
||||
//Mapper idanResult dans le tableau de saisie
|
||||
require_once 'common/dates.php';
|
||||
$saisie = array(
|
||||
'source' => $idanResult['source'],
|
||||
'dateParution' => WDate::dateT('Y-m-d', 'd/m/Y', substr($idanResult['dateSource'],0,10)),
|
||||
'dateJugement' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult['dateJugement']),
|
||||
'tribunal' => $idanResult['tribunal'],
|
||||
'even' => $idanResult['even'],
|
||||
'eventNum' => $eventLimit,
|
||||
'comp' => $idanResult['complement'],
|
||||
'montant' => $idanResult['montant'],
|
||||
);
|
||||
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){
|
||||
alert($.param(formData));
|
||||
},
|
||||
success: function(data){
|
||||
$('#saisie').html(data);
|
||||
}
|
||||
};
|
||||
$(this).ajaxSubmit(options);
|
||||
return false;
|
||||
});";
|
||||
echo '</script>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = $_REQUEST['siret'];
|
||||
FB::log($idan, 'idan');
|
||||
try {
|
||||
$O = $client->supprAnnonceCollecte($idan, $siret);
|
||||
$error = $O['error'];
|
||||
@ -48,7 +90,6 @@ switch ( $subaction ) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
}
|
||||
FB::log($O, 'O');
|
||||
if ( isset($error) && $error['errNum'] == 0 ){
|
||||
echo 'Annonce '.$idan.' supprimé !';
|
||||
} elseif ( isset($error) && $error['errNum'] != 0 ) {
|
||||
@ -62,8 +103,8 @@ switch ( $subaction ) {
|
||||
|
||||
break;
|
||||
case 'edit':
|
||||
|
||||
|
||||
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_save.php';
|
||||
echo saisie_save($siret, '', $tabInfo);
|
||||
break;
|
||||
}
|
@ -80,7 +80,11 @@ if (!$selOne) echo '<option value="0000" selected>-</option>';
|
||||
|
||||
<h2>BODACC</h2>
|
||||
|
||||
<?php require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';?>
|
||||
<?php
|
||||
$saisie = isset($_SESSION['saisie']) ? $_SESSION['saisie'] : array();
|
||||
$saisie['tribunal'] = $etab['TribunalCode'];
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
?>
|
||||
|
||||
<h2 id="dFormActionnaire">Actionnariat</h2>
|
||||
<div id="formActionnaire">
|
||||
|
@ -1,15 +1,30 @@
|
||||
<label>Source <font color="Red">*</font></label>
|
||||
<select name="jugement[source]">
|
||||
|
||||
<option value="TS" <?if (!isset($_SESSION['saisie']['source']) || $_SESSION['saisie']['source']=='TS') echo 'selected';?>>Tribunal via CCI</option>
|
||||
<option value="TD" <?if ($_SESSION['saisie']['source']=='TD') echo 'selected';?>>Tribunal directement</option>
|
||||
<option value="TA" <?if ($_SESSION['saisie']['source']=='TA') echo 'selected';?>>Tribunal via autre tiers</option>
|
||||
<?php
|
||||
$tmp=$client->getListeJalCollecte();
|
||||
$liste=$tmp['result'];
|
||||
$select = '';
|
||||
if ( !isset($saisie['source']) || $saisie['source']=='TS' ){
|
||||
$select = 'selected';
|
||||
}
|
||||
?>
|
||||
<option value="TS" <?=$select?>>Tribunal via CCI</option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( $saisie['source']=='TD' ){ $select = 'selected'; }
|
||||
?>
|
||||
<option value="TD" <?=$select?>>Tribunal directement</option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( $saisie['source']=='TA' ){ $select = 'selected'; }
|
||||
?>
|
||||
<option value="TA" <?=$select?>>Tribunal via autre tiers</option>
|
||||
<?php
|
||||
$tmp = $client->getListeJalCollecte();
|
||||
$liste = $tmp['result'];
|
||||
foreach ($liste as $id=>$lib) {
|
||||
echo "<option value=\"JS$id\" ";
|
||||
if ($_SESSION['saisie']['source']=="JS$id") echo 'selected';
|
||||
if ( $saisie['source']=="JS$id" ) {
|
||||
echo 'selected';
|
||||
}
|
||||
echo ">$lib</option>";
|
||||
}
|
||||
?>
|
||||
@ -17,17 +32,17 @@ foreach ($liste as $id=>$lib) {
|
||||
|
||||
<div id="dateParution">
|
||||
<label>Date de parution <font color="Red">*</font></label>
|
||||
<input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?if (isset($_SESSION['saisie']['dateParution'])) echo $_SESSION['saisie']['dateParution'];?>" />
|
||||
<input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?=$saisie['dateParution']?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
</div>
|
||||
|
||||
<div id="numParution">
|
||||
<label>N° de parution</label>
|
||||
<input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?if (isset($_SESSION['saisie']['numParution'])) echo $_SESSION['saisie']['numParution'];?>" />
|
||||
<input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?=$saisie['numParution']?>" />
|
||||
</div>
|
||||
|
||||
<label>Date évènement / jugement<font color="Red">*</font></label>
|
||||
<input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="" />
|
||||
<input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="<?=$saisie['dateJugement']?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
|
||||
<label>Tribunal <font color="Red">*</font></label>
|
||||
@ -35,8 +50,7 @@ foreach ($liste as $id=>$lib) {
|
||||
<option value="-" selected>-</option>
|
||||
<?php
|
||||
//Affectation du code tribunal présent dans la fiche identité pour comparaison
|
||||
$codeCmp = $etab['TribunalCode'];
|
||||
|
||||
$codeCmp = $saisie['tribunal'];
|
||||
//Si le code tribunal n'est pas défini dans la fiche identité
|
||||
//alors en sélectionner un par défault suivant le code INSEE
|
||||
if ($codeCmp == ''){
|
||||
@ -70,21 +84,24 @@ foreach ($liste as $code=>$lib) {
|
||||
</select>
|
||||
|
||||
<label>Évènement / Jugement <font color="Red">*</font></label>
|
||||
<select id="jugement" name="jugement[even][]" size="5">
|
||||
<option value="0000" selected>-</option>
|
||||
<?php
|
||||
//Tri des libellées par ordre alphabétique
|
||||
asort($tabEvent);
|
||||
//Affichage
|
||||
foreach($tabEvent as $key => $event)
|
||||
{
|
||||
?>
|
||||
<option value="<?=$key?>"><?=$event?></option>
|
||||
<?php
|
||||
<select id="jugement" name="jugement[even][]" size="5" >
|
||||
<option value="0000">-</option>
|
||||
<?php
|
||||
$eventNum = isset($saisie['eventNum']) ? $saisie['eventNum'] : '0000' ;
|
||||
asort($tabEvent);
|
||||
foreach($tabEvent as $key => $event)
|
||||
{
|
||||
$select = '';
|
||||
if ( in_array($key, $saisie['even']) ) {
|
||||
$select = 'selected';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$key?>" <?=$select?>><?=$event?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<div id="subFormSaisie">
|
||||
<?php require_once realpath(dirname(__FILE__)).'/event/event_0000.php';?>
|
||||
<?php require_once realpath(dirname(__FILE__)).'/event/event_'.$eventNum.'.php';?>
|
||||
</div>
|
@ -49,7 +49,7 @@ function saisie_save($siret, $idEntreprise, $tabInfo) {
|
||||
}
|
||||
}
|
||||
|
||||
//Sélection nic pour etéblissement concerné
|
||||
//Sélection nic pour établissement concerné
|
||||
if ( isset($etabnic) && $etabnic != '' ) {
|
||||
if ( isset($txtEtab) && $txtEtab!='' ) {
|
||||
$tabJugement['comp'].= ', '.$etabnic;
|
||||
|
@ -1 +0,0 @@
|
||||
<?php
|
@ -1,6 +1,7 @@
|
||||
$(document).ready(function(){
|
||||
//Gestion boite dialog mandataire
|
||||
$('a.annonceDelete').live('click', function(){
|
||||
$('a.annonceDelete').click(function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
@ -24,13 +25,39 @@ $(document).ready(function(){
|
||||
},
|
||||
'Quitter': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialogmand').remove(); }
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialogmand"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
});
|
||||
|
||||
$('a.annonceEdit').live('click', function(){
|
||||
$('a.annonceEdit').click(function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 800,
|
||||
height: 400,
|
||||
modal: true,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...').load(href);
|
||||
},
|
||||
buttons: {
|
||||
'Enregistrer': function() {
|
||||
alert($('form#saisie').attr('action'));
|
||||
$('form#saisie').submit();
|
||||
},
|
||||
'Quitter': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
});
|
||||
|
||||
$('a.annonceCopy').click(function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
@ -39,6 +66,7 @@ $(document).ready(function(){
|
||||
width: 350,
|
||||
height: 150,
|
||||
modal: true,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...').load(href);
|
||||
},
|
||||
@ -46,31 +74,8 @@ $(document).ready(function(){
|
||||
'Enregistrer': function() { },
|
||||
'Quitter': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialogmand').remove(); }
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialogmand"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.annonceCopy').live('click', function(){
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 350,
|
||||
height: 150,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...').load(href);
|
||||
},
|
||||
buttons: {
|
||||
'Enregistrer': function() { },
|
||||
'Quitter': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialogmand').remove(); }
|
||||
};
|
||||
$('<div id="dialogmand"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
});
|
||||
});
|
@ -146,8 +146,6 @@ if ($idan && ($vue=='bodacc' || $vue=='abod' || $vue=='balo' || $vue=='asso'))
|
||||
}
|
||||
$edition = '';
|
||||
if ( hasModeEdition() ){
|
||||
$edition.= '<script language="type/javascript" src="js/jquery.form.js"></script>';
|
||||
$edition.= '<script language="type/javascript" src="js/annonces.js"></script>';
|
||||
$edition.= ' <a class="annonceEdit" href="/?page=saisieajax&q=annonces/editDialog/'.
|
||||
$idan.'/'.$siret.'" title="Edition annonce">'.
|
||||
'<img src="./img/interface/editer.png"/></a>';
|
||||
@ -157,6 +155,8 @@ if ($idan && ($vue=='bodacc' || $vue=='abod' || $vue=='balo' || $vue=='asso'))
|
||||
$edition.= ' <a class="annonceCopy" href="/?page=saisieajax&q=annonces/copyDialog/'.
|
||||
$idan.'/'.$siret.'"'.' title="Dupliquer sur autre Siren ">'.
|
||||
'<img src="./img/save_copy.png"/></a>';
|
||||
$edition.= '<script type="text/javascript" src="js/jquery.form.js"></script>';
|
||||
$edition.= '<script type="text/javascript" src="js/annonces.js"></script>';
|
||||
}
|
||||
?>
|
||||
<?='<img src="'.$logo.'" />'?> <?=$libelle?> <?=$edition?>
|
||||
|
@ -17,9 +17,6 @@ require_once 'siren.php';
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
|
||||
<?php if ($sortie!='pdf'){ ?>
|
||||
<base href="<?=EXTRANET_URL?>" />
|
||||
<?php } ?>
|
||||
<title>Extranet Scores & Décisions - <?=$title?></title>
|
||||
<?php require_once 'includeheader.php'; ?>
|
||||
</head>
|
||||
|
Loading…
x
Reference in New Issue
Block a user