exclusion sur les naf etablissements.

This commit is contained in:
Damien LASSERRE 2012-04-10 15:53:10 +00:00
parent 1bdce6771c
commit f6a9e222c1

View File

@ -121,7 +121,7 @@ Class Ciblage
return ($depts);
}
protected function writeRequest($name, $valeur, $ex, $or = false) {
if(in_array($name, array('adr_com_ex', 'adr_dept_ex', 'bilType_ex'))) {
if(in_array($name, array('adr_com_ex', 'adr_dept_ex', 'bilType_ex', 'ape_etab_ex'))) {
if(!strstr($this->alpha, 'adr_dept') or
!strstr($this->alpha, 'ape_etab') or
!strstr($this->alpha, 'bilType') or
@ -164,7 +164,7 @@ Class Ciblage
protected function setAlpha($name, $valeur, $ex = false)
{
$or = array('adr_com', 'adr_dept', 'adr_com_ex', 'adr_dept_ex');
$and = array('bilType', 'ape_etab','ape_entrep', 'NaceEntrep', 'NaceEtab', 'bilType_ex');
$and = array('bilType', 'ape_etab_ex', 'ape_etab','ape_entrep', 'NaceEntrep', 'NaceEtab', 'bilType_ex');
if(!empty($this->alpha))
$this->alpha .= ' ';
if(in_array($name, $or)) {
@ -227,6 +227,9 @@ Class Ciblage
protected function ape_etab($valeur) {
$this->setAlpha('ape_etab', $valeur);
}
protected function ape_etab_ex($valeur) {
$this->setAlpha('ape_etab_ex', $valeur, true);
}
protected function ape_entrep($valeur) {
$this->setAlpha('ape_entrep', $valeur);
}