si un commercial crée un client il lui est attribué automatiquement

This commit is contained in:
Regis Houssin 2006-03-13 16:19:35 +00:00
parent 7fced7fe57
commit ab41bc3e93

View File

@ -159,6 +159,12 @@ class Societe {
$ret = $this->update($this->id,$user,0); $ret = $this->update($this->id,$user,0);
// si un commercial crée un client il lui est affecté automatiquement
if (!$user->rights->commercial->client->voir)
{
$this->add_commercial($user, $user->id);
}
if ($ret >= 0) if ($ret >= 0)
{ {
$this->use_webcal=($conf->global->PHPWEBCALENDAR_COMPANYCREATE=='always'?1:0); $this->use_webcal=($conf->global->PHPWEBCALENDAR_COMPANYCREATE=='always'?1:0);