Tri des bilans par ordre

This commit is contained in:
Michael RICOIS 2009-10-13 08:48:19 +00:00
parent ced41ef151
commit 18fa6b2fec

View File

@ -38,6 +38,20 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
try {
$O = $client->getListeBilans($siren);
$tabBilans = $O['result'];
//Tri du tableau
foreach($tabBilans as $key => $bilan)
{
$cle[$key] = $key[0].substr($key, -4);
$dateProvPartenaire[$key] = $bilan['dateProvPartenaire'];
$dateInsert[$key] = $bilan['dateInsert'];
$dureeExercice[$key] = $bilan['dureeExercice'];
$dateExercicePre[$key] = $bilan['dateExercicePre'];
$monnaie[$key] = $bilan['monnaie'];
$source[$key] = $bilan['source'];
}
array_multisort($cle, SORT_DESC, $tabBilans);
cache_add('tabBilans', $tabBilans);
if (isset($_REQUEST['mil'])) {
$tabTmp = explode(',',$_REQUEST['mil']);
@ -52,6 +66,7 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
die();
}
}
$firephp->log($tabBilans, 'tabBilan');
?>
<div id="center" style="width:660px">
<h1 class="titre">&Eacute;L&Eacute;MENTS FINANCIERS - BILANS</h1>