Add profil if not exist during preview

This commit is contained in:
Michael RICOIS 2012-05-28 15:41:16 +00:00
commit 993dc60000

View File

@ -212,10 +212,13 @@ class ComptageController extends Zend_Controller_Action
->where('idClient = ?', $user->idClient);
$result = $profilsM->fetchRow($sql);
//@todo : Si il n'existe pas de profil, que faire ....
$profil = json_decode($result['criteres'], true);
//No profil, define it
if (count($profil)==0) {
$profil = array('raisonSociale');
}
$extractSql = $extractLabel = array();
//$extractSql[] = "CONCAT(LPAD(siren, 9, '000000000'), LPAD(nic, 5, '00000')) AS siret";
//$extractLabel[] = 'SIRET';