issue #0001375 : Correction pour comptage sur chaque type d'annonces et fait une addition pour le total

This commit is contained in:
Michael RICOIS 2012-09-28 14:54:37 +00:00
parent d80df2a556
commit a2785b0566

View File

@ -4646,30 +4646,32 @@ TOTAL : $dureeTot s\n";
* @param string $siren
* @param string $type A:avis d'attribution, M:Avis de marché
*/
public function getAnnoncesBoampCount($siren, $type='A')
public function getAnnoncesBoampCount($siren, $type='')
{
$bodacc = array();
if ( $type=='A' ) {
$bodaccA = array();
$bodaccM = array();
if ( $type=='' || $type=='A' ) {
/** Recherche dans les avis d'attribution **/
$bodacc=$this->iDb->select(
$bodaccA=$this->iDb->select(
'boamp_lots l, boamp b, boamp_detail d',
"l.id",
"l.siren='$siren' AND l.idAnn=b.id AND l.idAnn=d.id GROUP BY b.id ORDER BY l.Boamp_Date_Parution",
false, MYSQL_ASSOC
);
} elseif ( $type=='M') {
}
if ( $type=='' || $type=='M') {
/** Recherche dans les avis de marchés **/
$bodacc=$this->iDb->select( 'boamp b, boamp_detail d',
$bodaccM=$this->iDb->select( 'boamp b, boamp_detail d',
"d.id",
"d.siren='$siren' AND d.id=b.id GROUP BY b.id ORDER BY d.Boamp_Date_Parution DESC",
false, MYSQL_ASSOC
);
}
$nb = count($bodacc);
$nb = count($bodaccA) + count($bodaccM);
return $nb;
}