diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 4def01d2c7f..c8cec4172c7 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -194,6 +194,13 @@ class ConferenceOrBoothAttendee extends CommonObject $this->fields['entity']['enabled'] = 0; } + if (!empty($conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT)) { + $this->fields['fk_soc']['type'] .= ' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.'categorie_societe as c WHERE c.fk_categorie='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT.')'; + } + if ($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE!=='') { + $this->fields['fk_soc']['type'] .= ' AND client='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE; + } + // Example to show how to set values of fields definition dynamically /*if ($user->rights->eventorganization->conferenceorboothattendee->read) { $this->fields['myfield']['visible'] = 1; diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 57106492f12..8dadf5fdb97 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -54,6 +54,7 @@ ConferenceOrBooth = Conference Or Booth ConferenceOrBoothTab = Conference Or Booth AmountOfSubscriptionPaid = Amount of subscription paid DateSubscription = Date of subscription +ConferenceOrBoothAttendee = Conference Or Booth Attendee # # Template Mail