Skip to content
Snippets Groups Projects
Commit 7476a3c8 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix error during migration

parent e802ff33
No related branches found
No related tags found
No related merge requests found
......@@ -135,10 +135,13 @@ class modDeplacement extends DolibarrModules
$this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('deplacement',1).')';
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR d.fk_soc IS NULL)';
$childids = $user->getAllChildIds();
$childids[]=$user->id;
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
if (! empty($user)) // Not defined during migration process
{
$childids = $user->getAllChildIds();
$childids[]=$user->id;
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment