2012-06-08 13:18:09 +00:00
|
|
|
<div id="center">
|
2012-09-13 14:43:14 +00:00
|
|
|
<?php if ($message!='') {?>
|
2012-06-08 13:18:09 +00:00
|
|
|
<div style="margin:5px; padding: 0pt 0.7em;" class="ui-state-highlight ui-corner-all">
|
|
|
|
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
|
|
|
|
<?=$message?></p>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<h1 class="titre">Saisie ou Correction Liasse</h1>
|
|
|
|
<div class="paragraph">
|
|
|
|
|
2012-09-13 14:43:14 +00:00
|
|
|
<div class="clearfix">
|
2012-06-08 13:18:09 +00:00
|
|
|
<label>Numéro identifiant Siret</label>
|
|
|
|
<?=$this->SiretTexte($this->siret)?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix">
|
|
|
|
<label>Raison Sociale</label>
|
|
|
|
<?=$this->raisonSociale?>
|
|
|
|
</div>
|
|
|
|
|
2012-09-13 14:43:14 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="paragraph">
|
|
|
|
<?php if ($this->infos) {?>
|
|
|
|
<div class="tabbed_area">
|
|
|
|
<ul class="tabs">
|
|
|
|
<?php foreach ($this->ancres as $id => $name):?>
|
|
|
|
<li><a href="#<?=$id?>" title="<?=$name?>" class="tab"><?=$name?></a></li>
|
|
|
|
<?php endforeach;?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<?php
|
|
|
|
if ($this->typeBilan=='N' || $this->typeBilan=='C') {
|
|
|
|
echo $this->partial('saisie/liasse/2050.phtml');
|
|
|
|
} elseif ($this->typeBilan=='S') {
|
|
|
|
echo $this->partial('saisie/liasse/2033.phtml');
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<div id="saveMsg" style="text-align:center;"></div>
|
|
|
|
<div style="text-align:center;"><input type="submit" class="button" id="save" name="save" value="Enregistrer" /></div>
|
|
|
|
<script>
|
|
|
|
$('input#save').click(function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var strPostes = '';
|
|
|
|
$('span.poste').each(function(){
|
|
|
|
id = $(this).attr('id');
|
|
|
|
val = $(this).html();
|
|
|
|
if (val != id && val != '' && val != '-') {
|
|
|
|
if (strPostes!='') strPostes = strPostes + ';';
|
|
|
|
strPostes = strPostes + id + '=' + val;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$('input#save').css('display', 'none');
|
|
|
|
$('div#saveMsg').html('Enregistrement en cours....');
|
|
|
|
$.post('/saisie/liassesave/siren/<?=$this->siren?>', {
|
|
|
|
unite: $('span#unit').html(),
|
|
|
|
dateCloture: $('span#dateCloture').html(),
|
|
|
|
dureeMois: $('span#dureeMois').html(),
|
|
|
|
dateCloturePre: $('span#dateCloturePre').html(),
|
|
|
|
dureeMoisPre: $('span#dureeMoisPre').html(),
|
|
|
|
typeBilan: $('span#typeBilan').html(),
|
|
|
|
postes: strPostes
|
|
|
|
}, function(data) {
|
|
|
|
if (data.status=='OK') {
|
|
|
|
$('div#saveMsg').html('Bilan modifié.');
|
2012-09-18 09:05:47 +00:00
|
|
|
} else if (data.status=='ERR' && data.postes.length>0) {
|
|
|
|
for (i in data.postes) {
|
|
|
|
$('span#'+data.postes[i]).removeClass('editable-change').addClass('editable-error');
|
2012-09-13 14:43:14 +00:00
|
|
|
}
|
|
|
|
$('div#saveMsg').html(data.message);
|
|
|
|
$('input#save').css('display', 'block');
|
|
|
|
} else if (data.status=='ERR') {
|
|
|
|
$('div#saveMsg').html(data.message);
|
|
|
|
$('input#save').css('display', 'block');
|
|
|
|
} else {
|
|
|
|
$('div#saveMsg').html('Error');
|
|
|
|
$('input#save').css('display', 'block');
|
|
|
|
}
|
|
|
|
}, 'json'
|
|
|
|
).error(function(){
|
|
|
|
$('div#saveMsg').html('Error');
|
|
|
|
$('input#save').css('display', 'block');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php } else {?>
|
|
|
|
Aucune sélection.
|
|
|
|
<?php }?>
|
|
|
|
</div>
|
2012-06-08 13:18:09 +00:00
|
|
|
|
|
|
|
</div>
|