Commentaire
This commit is contained in:
parent
b509df228c
commit
a43e1bc0f7
@ -930,6 +930,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
// --- Correction d'un bilan
|
||||
if ($date!='NEW') {
|
||||
$milDate = $milDatePre = null;
|
||||
// --- Recherche dans la liste des bilans
|
||||
$listBilans = $ws->getListeBilans($siren);
|
||||
if ( count($listBilans->result->item) > 0 ) {
|
||||
foreach ($listBilans->result->item as $item) {
|
||||
@ -937,13 +938,14 @@ class SaisieController extends Zend_Controller_Action
|
||||
if ($item->dateExercice == $date) {
|
||||
$milDate = $item->dateExercice;
|
||||
}
|
||||
if (substr($item->dateExercice,0,4) == intval(substr($date,0,4))-1) {
|
||||
if (intval(substr($item->dateExercice,0,4)) == intval(substr($date,0,4))-1) {
|
||||
$milDatePre = $item->dateExercice;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- Selection des valeurs du bilan en cours
|
||||
if ( null !== $milDate ) {
|
||||
Zend_Registry::get('firebug')->info('milDate');
|
||||
$response = $ws->getBilan($siren, $milDate, $type, true);
|
||||
@ -958,7 +960,9 @@ class SaisieController extends Zend_Controller_Action
|
||||
foreach ($response->POSTES->item as $item) {
|
||||
$postes[$item->id] = $item->val;
|
||||
}
|
||||
} elseif ( null === $milDate && null !== $milDatePre ) {
|
||||
}
|
||||
// --- Selection des valeurs du bilan précédent pour remplir la colonne N-1
|
||||
elseif ( null === $milDate && null !== $milDatePre ) {
|
||||
Zend_Registry::get('firebug')->info('milDatePre');
|
||||
$response = $ws->getBilan($siren, $milDatePre, $type, true);
|
||||
Zend_Registry::get('firebug')->info($response);
|
||||
|
Loading…
Reference in New Issue
Block a user