]> wagnertech.de Git - timetracker.git/blobdiff - mobile/client_add.php
Refactoring in export to use a generic get function to keep things simple.
[timetracker.git] / mobile / client_add.php
index fc57853d7409263e96499b04122c6c233fd62a8a..7a097b5ff5a98d9561b0da240e0ac5b589a514c4 100644 (file)
@@ -41,7 +41,7 @@ if (!$user->isPluginEnabled('cl')) {
   exit();
 }
 
-$projects = ttTeamHelper::getActiveProjects($user->team_id);
+$projects = ttTeamHelper::getActiveProjects($user->group_id);
 
 if ($request->isPost()) {
   $cl_name = trim($request->getParameter('name'));
@@ -71,7 +71,8 @@ if ($request->isPost()) {
   if ($err->no()) {
     if (!ttClientHelper::getClientByName($cl_name)) {
       if (ttClientHelper::insert(array(
-        'team_id' => $user->team_id,
+        'group_id' => $user->getActiveGroup(),
+        'org_id' => $user->org_id,
         'name' => $cl_name,
         'address' => $cl_address,
         'tax' => $cl_tax,