From 16b67af0805d40e4ba5ca5f121c0a0e3f45ebf84 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 7 Feb 2014 14:07:18 +0000 Subject: [PATCH] =?UTF-8?q?issue=20#0001851=20:=20Correction=20affichage?= =?UTF-8?q?=20ann=C3=A9e=20N-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/FinanceController.php | 11 +++++++++-- .../views/default/scripts/finance/liasse/2050.phtml | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/application/controllers/FinanceController.php b/application/controllers/FinanceController.php index e154cd369..21748215b 100644 --- a/application/controllers/FinanceController.php +++ b/application/controllers/FinanceController.php @@ -924,8 +924,15 @@ class FinanceController extends Zend_Controller_Action $date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd'); $this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy')); - $date = new Zend_Date($infoLiasse->getInfo('dateCloturePre'), 'yyyyMMdd'); - $this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy')); + + Zend_Registry::get('firebug')->info('test:'.$infoLiasse->getInfo('dateCloturePre')); + $dateCloturePre = $infoLiasse->getInfo('dateCloturePre'); + if ( $dateCloturePre == '' ) { + $this->view->assign('dateCloturePreD', '-'); + } else { + $date = new Zend_Date($dateCloturePre, 'yyyyMMdd'); + $this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy')); + } $this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois')); $this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre')); diff --git a/application/views/default/scripts/finance/liasse/2050.phtml b/application/views/default/scripts/finance/liasse/2050.phtml index 86ca0d97b..561e13a5d 100644 --- a/application/views/default/scripts/finance/liasse/2050.phtml +++ b/application/views/default/scripts/finance/liasse/2050.phtml @@ -12,8 +12,8 @@ Brut Amortissement, provisions - dateCloture.'
'.$this->dureesMois?> Mois
- dateCloturePre.'
'.$this->dureesMoisPre;?> Mois
+ dateCloture?>
dureesMois!='') {?>dureesMois?> Mois + dateCloturePre?>
dureesMoisPre!='') {?>dureesMoisPre?> Mois A
C
T
I
F