Limitation des bilans à 5 max
This commit is contained in:
parent
89668f1b84
commit
5054f54b3e
@ -2739,7 +2739,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
global $tva, $mBil, $efftr, $tabInfla;
|
||||
require_once 'Metier/scores/classMRatios.php';
|
||||
$mBil = new MBilans($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
if ($nbBilans>0)
|
||||
@ -4260,23 +4260,43 @@ class Entreprise extends Scores_Ws_Server
|
||||
$mBil = new MBilans($siren);
|
||||
$tabBilan = $mBil->getBilan($millesime, $typeBilan, $ref, true);
|
||||
|
||||
// --- Bilan condidentiel
|
||||
|
||||
|
||||
// --- Génération du format pour le webservice
|
||||
$txtKey = array(
|
||||
'SIREN',
|
||||
'DATE_FRAICHE_BILAN',
|
||||
'DATE_CLOTURE',
|
||||
'DATE_CLOTURE_PRE',
|
||||
'DUREE_MOIS',
|
||||
'DUREE_MOIS_PRE',
|
||||
'MONNAIE',
|
||||
'CONSOLIDE',
|
||||
'MONNAIE_ORI',
|
||||
'MONNAIE_LIV_UNITE',
|
||||
'SOURCE',
|
||||
'devise',
|
||||
'ID_BILAN_SD',
|
||||
'DATE_BILAN_SD',
|
||||
'TOP_CONFIDENTIEL',
|
||||
);
|
||||
|
||||
$resultBilan = new Bilan();
|
||||
$tabPoste = array();
|
||||
foreach($tabBilan as $key => $value) {
|
||||
if(!in_array($key, array('SIREN', 'DATE_FRAICHE_BILAN',
|
||||
'DATE_CLOTURE', 'DATE_CLOTURE_PRE', 'DUREE_MOIS',
|
||||
'DUREE_MOIS_PRE', 'MONNAIE', 'CONSOLIDE', 'MONNAIE_ORI',
|
||||
'MONNAIE_LIV_UNITE', 'SOURCE', 'devise'))){
|
||||
if( in_array($key, $txtKey)) {
|
||||
$resultBilan->$key = $value;
|
||||
} else {
|
||||
$resultPoste = new BilanPoste();
|
||||
$resultPoste->id = $key;
|
||||
$resultPoste->val = $value;
|
||||
$tabPoste[] = $resultPoste;
|
||||
} else {
|
||||
$resultBilan->$key = $value;
|
||||
}
|
||||
}
|
||||
$this->wsLog('bilan',$siren, $millesime.':'.$typeBilan.':'.$ref);
|
||||
$resultBilan->POSTES = $tabPoste;
|
||||
|
||||
$this->wsLog('bilan',$siren, $millesime.':'.$typeBilan.':'.$ref);
|
||||
return $resultBilan;
|
||||
}
|
||||
|
||||
@ -4615,7 +4635,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
//Ratios
|
||||
$mBil = new MBilans($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
if ($nbBilans > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user