Saisie/Liasse update
This commit is contained in:
parent
d081b5d72c
commit
ee8822f845
@ -1088,7 +1088,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$milDate = $milDatePre = null;
|
||||
$listBilans = $ws->getListeBilans($siren);
|
||||
if ( count($listBilans->result->item) > 0 ) {
|
||||
foreach ($listBilans->result->item as $item) {
|
||||
foreach ($listBilans->result->item as $item) {
|
||||
if ($type == $item->typeBilan) {
|
||||
if ($item->dateExercice == $date) {
|
||||
$milDate = $item->dateExercice;
|
||||
@ -1101,8 +1101,8 @@ class SaisieController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
if ( null !== $milDate ) {
|
||||
Zend_Registry::get('firebug')->info('milDate');
|
||||
$response = $ws->getBilan($siren, $milDate, $type, true);
|
||||
Zend_Registry::get('firebug')->info($response);
|
||||
$infos = new stdClass();
|
||||
$infos->siren = $response->siren;
|
||||
$infos->dateCloture = $response->DATE_CLOTURE;
|
||||
@ -1115,12 +1115,13 @@ class SaisieController extends Zend_Controller_Action
|
||||
$postes[$item->id] = $item->val;
|
||||
}
|
||||
} elseif ( null === $milDate && null !== $milDatePre ) {
|
||||
Zend_Registry::get('firebug')->info('milDatePre');
|
||||
$response = $ws->getBilan($siren, $milDatePre, $type, true);
|
||||
Zend_Registry::get('firebug')->info($response);
|
||||
$infos = new stdClass();
|
||||
$infos->siren = $response->siren;
|
||||
$infos->dateCloturePre = $response->DATE_CLOTURE_PRE;
|
||||
$infos->dureeMoisPre = $response->DUREE_MOIS_PRE;
|
||||
$infos->dateCloturePre = $response->DATE_CLOTURE;
|
||||
$infos->dureeMoisPre = $response->DUREE_MOIS;
|
||||
$infos->unite = empty($response->MONNAIE_LIV_UNITE) ? 'U' : $response->MONNAIE_LIV_UNITE;
|
||||
$postesN1 = array();
|
||||
foreach ($response->POSTES->item as $item) {
|
||||
@ -1377,6 +1378,8 @@ class SaisieController extends Zend_Controller_Action
|
||||
// ASSURANCE
|
||||
if (!isset($postes['NR4']) && isset($postesN1['AR4'])) $postes['AR4']=$postesN1['AR4'];
|
||||
}
|
||||
} else {
|
||||
$infos = 'NEW';
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user