issue #0001372 : Test
This commit is contained in:
parent
53e77c0da3
commit
cecd71d2ce
@ -1488,6 +1488,62 @@ class SaisieController extends Zend_Controller_Action
|
||||
$mode = $request->getParam('mode');
|
||||
$type = $request->getParam('type');
|
||||
|
||||
$session = new SessionEntreprise($siren);
|
||||
$rs = $session->getRaisonSociale();
|
||||
|
||||
//Création de la première référence lien
|
||||
$ws = new WsScores();
|
||||
|
||||
$infos = array(
|
||||
'siren' => $siren,
|
||||
'actif' => 1,
|
||||
'PpPm' => 'PM',
|
||||
'RS' => $rs,
|
||||
'civilite' => '',
|
||||
'nom' => '',
|
||||
'prenom' => '',
|
||||
'naissance_nom' => '',
|
||||
'naissance_date' => '',
|
||||
'naissance_dept_pays' => '',
|
||||
'naissance_lieu' => '',
|
||||
'nat' => '',
|
||||
'adresse_num' => '',
|
||||
'adresse_btq' => '',
|
||||
'adresse_codvoie' => '',
|
||||
'adresse_libvoie' => '',
|
||||
'adresse_comp' => '',
|
||||
'adresse_cp' => '',
|
||||
'adresse_ville' => '',
|
||||
'adresse_pays' => '',
|
||||
'refDoc' => '',
|
||||
'dateSaisie' => date('YmdHis'),
|
||||
'capital' => '',
|
||||
'deviseCapital' => 'EUR',
|
||||
'nbActions' => '',
|
||||
'idLoc1Type' => '',
|
||||
'idLoc1Num' => '',
|
||||
'idLoc2Type' => '',
|
||||
'idLoc2Num' => '',
|
||||
'idLoc3Type' => '',
|
||||
'idLoc3Num' => '',
|
||||
);
|
||||
|
||||
$idNewLien = $ws->setLienRef(json_encode($infos));
|
||||
if (is_int($idNewLien)) {
|
||||
$this->view->assign('id1', $idNewLien);
|
||||
}
|
||||
|
||||
//Affichage
|
||||
$this->view->assign('rs', $rs);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('mode', $mode);
|
||||
$this->view->assign('type', $type);
|
||||
|
||||
$idLien = $request->getParam('id', null);
|
||||
$this->view->assign('idLien', $idLien);
|
||||
|
||||
|
||||
|
||||
//Mode = delete
|
||||
/*
|
||||
id du lien pour récupérer les informations
|
||||
@ -1503,11 +1559,30 @@ class SaisieController extends Zend_Controller_Action
|
||||
- Liste des types d'identifiant par pays sdv1.tabIdLocal
|
||||
*/
|
||||
|
||||
$this->view->assign('mode', $mode);
|
||||
$this->view->assign('type', $type);
|
||||
|
||||
}
|
||||
|
||||
public function liensearchAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$query = $this->getRequest()->getParam('q');
|
||||
|
||||
$ws = new WsScores();
|
||||
$result = $ws->searchLienRef($query);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
$output = array();
|
||||
if (count($result->item)>0) {
|
||||
foreach ($result->item as $item) {
|
||||
$output[] = array(
|
||||
'value' => $item->id,
|
||||
'label' => $item->lib,
|
||||
);
|
||||
}
|
||||
}
|
||||
$this->view->assign('output', $output);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gestion des liens étrangers
|
||||
*/
|
||||
@ -1518,6 +1593,107 @@ class SaisieController extends Zend_Controller_Action
|
||||
$this->view->assign('countries', $this->selectPays);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des liens étrangers
|
||||
*/
|
||||
public function lienppAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->assign('countries', $this->selectPays);
|
||||
}
|
||||
|
||||
|
||||
public function lienrefsaveAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$params = $this->getRequest()->getParams();
|
||||
|
||||
Zend_Registry::get('firebug')->info($params);
|
||||
|
||||
//Construct reference informations
|
||||
|
||||
$params['PpPm'] = 'PM';
|
||||
|
||||
//Personne physique
|
||||
if ($params['pp']==1) {
|
||||
$params['PpPm'] = 'PP';
|
||||
$params['RS'] = '';
|
||||
} elseif (!empty($params['siren'])) {
|
||||
$params['RS'] = $params['nom'];
|
||||
$params['civilite'] = '';
|
||||
$params['nom'] = '';
|
||||
$params['prenom'] = '';
|
||||
$params['naissance_nom'] = '';
|
||||
$params['naissance_date'] = '';
|
||||
$params['naissance_dept_pays'] = '';
|
||||
$params['naissance_lieu'] = '';
|
||||
$params['nat'] = '';
|
||||
$params['adresse_num'] = '';
|
||||
$params['adresse_btq'] = '';
|
||||
$params['adresse_codvoie'] = '';
|
||||
$params['adresse_libvoie'] = '';
|
||||
$params['adresse_comp'] = '';
|
||||
$params['adresse_cp'] = '';
|
||||
$params['adresse_ville'] = '';
|
||||
$params['adresse_pays'] = '';
|
||||
} else {
|
||||
$params['siren'] = '000000000';
|
||||
$params['RS'] = $params['nom'];
|
||||
$params['civilite'] = '';
|
||||
$params['nom'] = '';
|
||||
$params['prenom'] = '';
|
||||
$params['naissance_nom'] = '';
|
||||
$params['naissance_date'] = '';
|
||||
$params['naissance_dept_pays'] = '';
|
||||
$params['naissance_lieu'] = '';
|
||||
$params['nat'] = '';
|
||||
}
|
||||
|
||||
$infos = array(
|
||||
'siren' => $params['siren'],
|
||||
'actif' => 1,
|
||||
'PpPm' => $params['PpPm'],
|
||||
'RS' => $params['RS'],
|
||||
'civilite' => $params['civilite'],
|
||||
'nom' => $params['nom'],
|
||||
'prenom' => $params['prenom'],
|
||||
'naissance_nom' => $params['naissance_nom'],
|
||||
'naissance_date' => $params['naissance_date'],
|
||||
'naissance_dept_pays' => $params['naissance_dept_pays'],
|
||||
'naissance_lieu' => $params['naissance_lieu'],
|
||||
'nat' => $params['nat'],
|
||||
'adresse_num' => $params['adresse_num'],
|
||||
'adresse_btq' => $params['adresse_btq'],
|
||||
'adresse_codvoie' => $params['adresse_codvoie'],
|
||||
'adresse_libvoie' => $params['adresse_libvoie'],
|
||||
'adresse_comp' => $params['adresse_comp'],
|
||||
'adresse_cp' => $params['adresse_cp'],
|
||||
'adresse_ville' => $params['adresse_ville'],
|
||||
'adresse_pays' => $params['adresse_pays'],
|
||||
'refDoc' => $params['refDoc'],
|
||||
'dateSaisie' => date('YmdHis'),
|
||||
'capital' => $params['capital'],
|
||||
'deviseCapital' => 'EUR',
|
||||
'nbActions' => $params['nbActions'],
|
||||
'idLoc1Type' => $params['idLoc1Type'],
|
||||
'idLoc1Num' => $params['idLoc1Num'],
|
||||
'idLoc2Type' => $params['idLoc2Type'],
|
||||
'idLoc2Num' => $params['idLoc2Num'],
|
||||
'idLoc3Type' => $params['idLoc3Type'],
|
||||
'idLoc3Num' => $params['idLoc3Num'],
|
||||
);
|
||||
|
||||
$ws = new WsScores();
|
||||
$idNewLien = $ws->setLienRef(json_encode($infos), $params['idLien']);
|
||||
|
||||
if (is_int($idNewLien)){
|
||||
$this->view->assign('result', array('id'=>$idNewLien, 'error'=>''));
|
||||
} else {
|
||||
$this->view->assign('result', array('id'=>0, 'error'=>$idNewLien));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sauvegarde
|
||||
@ -1526,6 +1702,29 @@ class SaisieController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$params = $this->getRequest()->getParams();
|
||||
|
||||
$infos = array(
|
||||
'id1' => '',
|
||||
'id2' => '',
|
||||
'actif' => 1,
|
||||
'ActionPart' => $params['ActionPart'],
|
||||
'Pmin' => '',
|
||||
'Pmax' => '',
|
||||
'MajMin' => '',
|
||||
'id2' => '',
|
||||
'dateLien' => '',
|
||||
'dateInsert' => '',
|
||||
);
|
||||
|
||||
$ws = new WsScores();
|
||||
//$idNewLien = $ws->setLien(json_encode($infos), $params['idLien']);
|
||||
if (is_int($idNewLien)){
|
||||
$this->view->assign('result', array('id'=>$idNewLien, 'error'=>''));
|
||||
} else {
|
||||
$this->view->assign('result', array('id'=>0, 'error'=>$idNewLien));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -82,8 +82,8 @@ if ( count($this->actionnaires)>0 ){
|
||||
</td>
|
||||
<?php if ($this->edition) {?>
|
||||
<td>
|
||||
<a class="dialog" title="Modifier actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'edit'))?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'delete'))?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
<a class="dialog" title="Modifier actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'edit','siren'=>$this->siren,'id'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'delete','siren'=>$this->siren,'id'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
</td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
@ -101,7 +101,7 @@ if ( count($this->actionnaires)>0 ){
|
||||
|
||||
<?php if ($this->edition) {?>
|
||||
<div style="line-height:16px;">
|
||||
<a class="dialog" title="Ajouter un actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add'))?>">
|
||||
<a class="dialog" title="Ajouter un actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add','siren'=>$this->siren), null, true)?>">
|
||||
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter un actionnaire</a>
|
||||
</div>
|
||||
<?php }?>
|
||||
@ -156,8 +156,8 @@ if (count($this->participations)>0)
|
||||
</td>
|
||||
<?php if ($this->edition) {?>
|
||||
<td>
|
||||
<a class="dialog" title="Modifier participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'edit'))?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'delete'))?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
<a class="dialog" title="Modifier participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'edit','siren'=>$this->siren,'id'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'delete','id'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
</td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
@ -174,7 +174,7 @@ if (count($this->participations)>0)
|
||||
|
||||
<?php if ($this->edition) {?>
|
||||
<div style="line-height:16px;">
|
||||
<a class="dialog" title="Ajouter une participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'add'))?>">
|
||||
<a class="dialog" title="Ajouter une participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'add','siren'=>$this->siren), null, true)?>">
|
||||
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter une participation</a>
|
||||
</div>
|
||||
<?php }?>
|
||||
@ -239,7 +239,16 @@ $('a.dialog').on('click', function(){
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
Valider: function() {},
|
||||
Valider: function() {
|
||||
if ($('input[name=id1]').length>0 || $('input[name=id2]').length>0) {
|
||||
var form = $('form[name=lien]');
|
||||
$.post(form.attr('action'), form.serialize(), function(data){
|
||||
|
||||
});
|
||||
} else {
|
||||
alert("Quelque chose manque !");
|
||||
}
|
||||
},
|
||||
Annuler: function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialogcmd').remove(); }
|
||||
|
@ -1,3 +1,5 @@
|
||||
<?php if ($this->id1){ ?>
|
||||
|
||||
<style>
|
||||
form em {color:#FF0000;}
|
||||
fieldset {border:1px solid; padding:5px;}
|
||||
@ -9,7 +11,7 @@ fieldset legend {padding:5px;}
|
||||
.fieldgrp label abbr {color:#4B911C; font-size:120%; vertical-align:middle;}
|
||||
fieldset .fieldgrp {clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
||||
fieldset .fieldgrp:after {content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
||||
fieldset .fieldgrp label {width:200px; clear:both; padding:0 10px 0 0; line-height:22px; _padding-top:3px; float:left; display:block;}
|
||||
fieldset .fieldgrp label { clear:both; padding:0 10px 0 0; line-height:22px; _padding-top:3px; float:left; display:block;}
|
||||
fieldset .fieldgrp label span {font-weight:normal;}
|
||||
fieldset .fieldgrp label abbr {color:#4B911C; font-size:120%; vertical-align:middle;}
|
||||
.field {float:left; padding:0 10px 0 0;line-height:22px;_padding-top:3px;}
|
||||
@ -24,114 +26,79 @@ div#etranger { display:none; }
|
||||
.ui-widget-content a {color:blue; text-decoration:underline;}
|
||||
</style>
|
||||
|
||||
<?php if ( $this->mode == 'delete' ) { ?>
|
||||
<div>
|
||||
<form name="lien" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'liensave'),null, true)?>" method="post">
|
||||
<input type="hidden" name="idLien" value="<?=$this->idLien?>" />
|
||||
<input type="hidden" name="id1" value="<?=$this->id1?>" />
|
||||
|
||||
<div class="fieldgrp">
|
||||
Etes-vous certain de vouloir supprimer le lien entre <?=$this->rs1?> (<?=$this->siren1?>)
|
||||
de la société <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
</div>
|
||||
<?php if ($this->type=='actionnaire') {?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Document de référence :</label>
|
||||
<div class="field">
|
||||
<select name=""><option>-</option></select>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( $this->mode == 'add' ) { ?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date du document ou date de cloture l'exercice :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="" value="" /> (JJ/MM/AAAAA)
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">Saisie d'un actionnaire pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
|
||||
<?=$this->render('saisie/lienfiche.phtml')?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date du changement :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="" value="" /> (JJ/MM/AAAAA)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Motif du changement :</label>
|
||||
<div class="field">
|
||||
<select name="">
|
||||
<option>-</option>
|
||||
<option>Fusion</option>
|
||||
<option>Cession de parts</option>
|
||||
<option>Acte SSP</option>
|
||||
<option>TUP</option>
|
||||
<option>Donation/Partage</option>
|
||||
<option>Vente/Cession</option>
|
||||
<option>Statuts</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if ($this->type=='actionnaire') {?>
|
||||
|
||||
<div class="fieldgrp">Saisie d'un actionnaire pour la société <?=$this->rs1?> (<?=$this->siren1?>)</div>
|
||||
<?php } else {?>
|
||||
|
||||
<?php if ($this->mode == 'edit') {?>
|
||||
<div class="fieldgrp">Modification d'un actionnaire pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
|
||||
<?php } else {?>
|
||||
<div class="fieldgrp">
|
||||
<label>au capital de </label>
|
||||
<div class="field">
|
||||
<input type="text" /> euros, en date du <input type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>découpé en </label>
|
||||
<div class="field">
|
||||
<input type="text" /> action(s) de <input type="text" /> euros nominale
|
||||
</div>
|
||||
Etes-vous certain de vouloir supprimer le lien entre <?=$this->rs?> (<?=$this->siren?>)
|
||||
de la société <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Document de référence :</label>
|
||||
<div class="field">
|
||||
<select><option>-</option></select> en date du <input type="text"/>
|
||||
<select name=""><option>-</option></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date du document ou date de cloture l'exercice :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="" value="" /> (JJ/MM/AAAAA)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date du changement :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="" value="" /> (JJ/MM/AAAAA)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Motif du changement :</label>
|
||||
<div class="field">
|
||||
<select name="">
|
||||
<option>-</option>
|
||||
<option>Fusion</option>
|
||||
<option>Cession de parts</option>
|
||||
<option>Acte SSP</option>
|
||||
<option>TUP</option>
|
||||
<option>Donation/Partage</option>
|
||||
<option>Vente/Cession</option>
|
||||
<option>Statuts</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->mode=='add' || $this->mode=='edit') {?>
|
||||
|
||||
<fieldset>
|
||||
<legend>Informations</legend>
|
||||
<legend>Liens</legend>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Raison sociale / Nom</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<a href="#">Recherche</a>,
|
||||
<a href="#" id="dpp">Personne physique</a>,
|
||||
<a href="#" id="detranger">Société étrangère</a>
|
||||
</div>
|
||||
|
||||
<div id="pp"><?=$this->render('saisie/lienpp.phtml')?></div>
|
||||
|
||||
<div id="etranger"><?=$this->action('lienetranger', 'saisie')?></div>
|
||||
|
||||
</fieldset>
|
||||
<input type="hidden" name="ActionPart" value="1" />
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Pourcentage</label>
|
||||
<div class="field">
|
||||
<input type="text"/> %
|
||||
<input type="text" name="Pmin" value="" size="3"/> %
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -163,158 +130,83 @@ de la société <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('a#dpp').click(function(){
|
||||
var state = $('div#pp').css('display');
|
||||
if (state=='none'){
|
||||
$('div#pp').css('display','block');
|
||||
} else {
|
||||
$('div#pp').css('display','none');
|
||||
}
|
||||
});
|
||||
$('a#detranger').click(function(){
|
||||
var state = $('div#etranger').css('display');
|
||||
if (state=='none'){
|
||||
$('div#etranger').css('display','block');
|
||||
} else {
|
||||
$('div#etranger').css('display','none');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php } elseif ($this->type=='participation') {?>
|
||||
|
||||
<div class="fieldgrp">Saisie d'une participation pour la société <?=$this->rs1?> (<?=$this->siren1?>)</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Document de référence :</label>
|
||||
<div class="field">
|
||||
<select><option>-</option></select> en date du <input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Informations</legend>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Raison sociale / nom</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="etranger"><?=$this->action('lienetranger', 'saisie')?></div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Capital</label>
|
||||
<div class="field">
|
||||
<input class="smallfield" type="text"/> euros, en date du <input class="smallfield" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->type=='participation') {?>
|
||||
|
||||
<?php if ( $this->mode == 'add' ) { ?>
|
||||
|
||||
<div class="fieldgrp">Saisie d'une participation pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
|
||||
|
||||
<?=$this->render('saisie/lienfiche.phtml')?>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<?php if ($this->mode == 'edit') {?>
|
||||
<div class="fieldgrp">Modification d'une participation pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
|
||||
<?php } else {?>
|
||||
<div class="fieldgrp">
|
||||
<label>Découpé en </label>
|
||||
<div class="field">
|
||||
<input class="smallfield" type="text"/> action(s) de <input class="smallfield" type="text" /> euros nominale(s)
|
||||
</div>
|
||||
Etes-vous certain de vouloir supprimer le lien entre <?=$this->rs?> (<?=$this->siren?>)
|
||||
de la société <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->mode=='add' || $this->mode=='edit') {?>
|
||||
<fieldset>
|
||||
<legend>Liens</legend>
|
||||
|
||||
<input type="hidden" name="ActionPart" value="2" />
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Pourcentage</label>
|
||||
<div class="field">
|
||||
<input class="smallfield" type="text"/> % (intérêts), de contrôle / Droit de vote <input class="smallfield" type="text" /> %
|
||||
<input type="text" name="Pmin" value="" size="3"/> %
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Détention</label>
|
||||
<div class="field">
|
||||
<input type="radio"/>Major.
|
||||
<input type="radio"/>Minor.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Droit de vote</label>
|
||||
<div class="field">
|
||||
<input type="text" /> %
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre d'actions</label>
|
||||
<div class="field">
|
||||
<input class="smallfield" type="text"/>
|
||||
<input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant détenu</label>
|
||||
<div class="field">
|
||||
<input class="smallfield" type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant détenu</label>
|
||||
<div class="field">
|
||||
<input type="radio"/>Major. <input type="radio"/>Minor.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Méthode d'intégration</label>
|
||||
<div class="field">
|
||||
<select name="">
|
||||
<option>-</option>
|
||||
<option value="ND">Non défini</option>
|
||||
<option value="IG">Intégration Globale</option>
|
||||
<option value="IP">Intégration partielle</option>
|
||||
<option value="MEQ">Mise en équivalence</option>
|
||||
<option value="NC">Non consolidé</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend><i><u>Si disponible (holding, etc) saisir quelques éléments du bilan :</u></i></legend>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Chiffre d'affaires</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Résultat Net</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Fonds Propres</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Total Bilan</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
|
||||
<script>
|
||||
$('a#detranger').click(function(){
|
||||
var state = $('div#etranger').css('display');
|
||||
if (state=='none'){
|
||||
$('div#etranger').css('display','block');
|
||||
} else {
|
||||
$('div#etranger').css('display','none');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php }?>
|
||||
|
||||
<?php } ?>
|
||||
<?php } else {?>
|
||||
|
||||
<?php } ?>
|
||||
Erreur.
|
||||
|
||||
<?php }?>
|
||||
|
||||
</form>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<label>Pays</label>
|
||||
<div class="field">
|
||||
<select>
|
||||
<option>-</option>
|
||||
<?php foreach($this->countries as $code => $lib) {?>
|
||||
<option value="<?=$code?>"><?=$lib?></option>
|
||||
<?php }?>
|
||||
@ -16,10 +17,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
<input type="text" name="adresse_num" size="4"/>
|
||||
<input type="text" name="adresse_btq" size="1"/>
|
||||
<input type="text" name="adresse_codvoie" size="4"/>
|
||||
<input type="text" name="adresse_libvoie" size="32"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse complément</label>
|
||||
<div class="field">
|
||||
<input type="text" name="adresse_comp" size="40"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
151
application/views/default/scripts/saisie/lienfiche.phtml
Normal file
151
application/views/default/scripts/saisie/lienfiche.phtml
Normal file
@ -0,0 +1,151 @@
|
||||
<div id="searchFiche">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Identifiant / Mots clés</label>
|
||||
<div class="field">
|
||||
<input type="text" name="search" class="autocomplete"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="#" id="newfiche">Aucun résultat, Créer une nouvelle fiche</a>
|
||||
|
||||
<div id="fiche" style="display:none;">
|
||||
|
||||
<form name="saveLienRef" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'lienrefsave'), null, true)?>" method="post">
|
||||
|
||||
<fieldset>
|
||||
<legend>Informations fiche</legend>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field">
|
||||
<input type="text" name="siren"/> <a href="#">Obtention Raison Sociale</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Raison sociale / Nom</label>
|
||||
<div class="field">
|
||||
<input type="text" name="nom"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<a href="<?=$this->url(array('controller'=>'saisie','action'=>'lienpp'))?>" class="lienRef">Personne physique</a>,
|
||||
<a href="<?=$this->url(array('controller'=>'saisie','action'=>'lienetranger'))?>" class="lienRef">Société étrangère</a>
|
||||
</div>
|
||||
<div id="lienRef"></div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>au capital de</label>
|
||||
<div class="field">
|
||||
<input type="text" name="capital" /> euros, en date du <input type="text" value="undefined"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>découpé en</label>
|
||||
<div class="field">
|
||||
<input type="text" name="nbActions" /> action(s) de <input type="text" value="undefined"/> euros nominale
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Document de référence :</label>
|
||||
<div class="field">
|
||||
<select><option>-</option></select> en date du <input type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<?php if ( $this->type=='participation' ) {?>
|
||||
<fieldset>
|
||||
<legend><i><u>Si disponible (holding, etc) saisir quelques éléments du bilan :</u></i></legend>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Chiffre d'affaires</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Résultat Net</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Fonds Propres</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Total Bilan</label>
|
||||
<div class="field">
|
||||
<input type="text"/> euros
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<div style="text-align:right;">
|
||||
<input type="submit" name="save" value="Créer la fiche"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('input.autocomplete').autocomplete({
|
||||
minLength:4,
|
||||
delay:1000,
|
||||
source: function(request, response) {
|
||||
$.getJSON('<?=$this->url(array('controller'=>'saisie','action'=>'liensearch'),null,true)?>', { q: request.term },
|
||||
function(data) { response(data); }
|
||||
);
|
||||
},
|
||||
select: function(event, ui) {
|
||||
$('div#searchFiche').replaceWith('<b>Fiche sélectionné id = '+ui.item.value+'.</b><input type="hidden" name="id2" value="'+ui.item.value+'"/>');
|
||||
}
|
||||
});
|
||||
|
||||
$('form[name=saveLienRef]').submit(function(e){
|
||||
var form = $(this);
|
||||
$.post(form.attr('action'), form.serialize(), function(data){
|
||||
alert(data.id);
|
||||
if(data.error==''){
|
||||
$('div#searchFiche').replaceWith('<b>Fiche créée id = '+data.id+'</b><input type="hidden" name="id2" value="'+data.id+'"/>');
|
||||
} else {
|
||||
$('div#searchFiche').replaceWith(data.error);
|
||||
}
|
||||
}, 'json').error(function(){ alert('Unknow error'); });
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a#newfiche').click(function(e){
|
||||
e.preventDefault();
|
||||
var display = $('div#fiche').css('display');
|
||||
if (display=='none'){
|
||||
$('div#fiche').css('display', 'block');
|
||||
} else {
|
||||
$('div#fiche').css('display', 'none');
|
||||
}
|
||||
});
|
||||
|
||||
$('a.lienRef').click(function(e){
|
||||
e.preventDefault();
|
||||
var url = $(this).attr('href');
|
||||
$('div#lienRef').load(url);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
@ -1,29 +1,37 @@
|
||||
<input type="hidden" name="pp" value="1"/>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom d'usage</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
<input type="text" name="naissance_nom"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Prénom(s)</label>
|
||||
<div class="field">
|
||||
<input type="text"/>
|
||||
<input type="text" name="prenom"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Civilité</label>
|
||||
<div class="field">
|
||||
<input type="radio" name="" value="M."/> M.
|
||||
<input type="radio" name="" value="Mme"/>Mme
|
||||
<input type="radio" name="" value="Mlle"/>Mlle
|
||||
<input type="radio" name="civilite" value="M"/>M.
|
||||
<input type="radio" name="civilite" value="Mme"/>Mme
|
||||
<input type="radio" name="civilite" value="Mlle"/>Mlle
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Né(e) le</label>
|
||||
<div class="field">
|
||||
<input type="text"/> à <input type="text"/> <select></select>
|
||||
<input type="text" size="10" name="naissance_date"/> à <input type="text" name="naissance_lieu"/>
|
||||
<select name="nat">
|
||||
<option>-</option>
|
||||
<?php foreach($this->countries as $code => $lib) {?>
|
||||
<option value="<?=$code?>"><?=$lib?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
<?=json_encode($this->result)?>
|
@ -0,0 +1 @@
|
||||
<?=json_encode($this->output)?>
|
@ -33,6 +33,66 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
public function setLien($infos, $id = null)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->infos = $infos;
|
||||
$params->id = $id;
|
||||
$client = $this->loadClient('saisie');
|
||||
try {
|
||||
$reponse = $client->setLien($params);
|
||||
return $reponse->setLienResult;
|
||||
} catch (SoapFault $fault) {
|
||||
Zend_Registry::get('firebug')->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 setLienRef($infos, $id = null)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->infos = $infos;
|
||||
$params->id = $id;
|
||||
$client = $this->loadClient('saisie');
|
||||
try {
|
||||
$reponse = $client->setLienRef($params);
|
||||
return $reponse->setLienRefResult;
|
||||
} catch (SoapFault $fault) {
|
||||
Zend_Registry::get('firebug')->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 searchLienRef($query)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->query = $query;
|
||||
$client = $this->loadClient('saisie');
|
||||
try {
|
||||
$reponse = $client->searchLienRef($params);
|
||||
return $reponse->searchLienRefResult;
|
||||
} catch (SoapFault $fault) {
|
||||
Zend_Registry::get('firebug')->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 setActeAsso($siren, $waldec, $type, $libelle, $date)
|
||||
{
|
||||
$params = new stdClass();
|
||||
|
Loading…
Reference in New Issue
Block a user