This commit is contained in:
Aram HARUTYUNYAN 2013-09-10 15:06:18 +00:00
parent 8fc68ff6c6
commit ce53ab4128
2 changed files with 9 additions and 1 deletions

View File

@ -1670,10 +1670,15 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('id1', $infos['idAct']);
}
$dateEffetLien = $this->wDate->dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']);
$doc = ($siren) ? $ws->getLienDoc($siren, 'Siren') : $ws->getLienDoc($lienRef, 'Entreprise');
$dateEffetLienDoc = ($doc->item[0]->date) ? $this->wDate->dateT('Y-m-d', 'd/m/Y', $doc->item[0]->date) : $dateEffetLien;
$this->view->assign('PDetention', $infos['PDetention']);
$this->view->assign('Pvote', $infos['Pvote']);
$this->view->assign('MajMin', $infos['MajMin']);
$this->view->assign('dateEffetLien', $this->wDate->dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']));
$this->view->assign('dateEffetLien', $dateEffetLien);
$this->view->assign('dateEffetLienDoc', $dateEffetLienDoc);
} else {

View File

@ -241,6 +241,7 @@ $('a#lienDoc').on('click', function(e){
$('select[name=motifUpdate]').on('change', function(e){
e.preventDefault();
$('input[name=dateEffetLien]').val('<?=$this->dateEffetLien;?>');
if ($(this).val()=='TUP') {
$('select[name=MajMin]').val('T');
$('input[name=PDetention]').val(0);
@ -249,6 +250,8 @@ $('select[name=motifUpdate]').on('change', function(e){
$('select[name=MajMin]').val('F');
$('input[name=PDetention]').val(0);
$('input[name=Pvote]').val(0);
} else if ($(this).val()=='Dernier rapport annuel') {
$('input[name=dateEffetLien]').val('<?=$this->dateEffetLienDoc;?>');
}
});