X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/bcfe9680fdb90d26de543b2c43feabefdcac3c20..722638fd8cc9400c5228106537effa1dcd0f7fa5:/mobile/expense_edit.php diff --git a/mobile/expense_edit.php b/mobile/expense_edit.php index 338e6c77..a039f42f 100644 --- a/mobile/expense_edit.php +++ b/mobile/expense_edit.php @@ -43,7 +43,7 @@ if (!$user->isPluginEnabled('ex')) { } $cl_id = (int)$request->getParameter('id'); // Get the expense item we are editing. -$expense_item = ttExpenseHelper::getItem($cl_id, $user->getActiveUser()); +$expense_item = ttExpenseHelper::getItem($cl_id, $user->getUser()); if (!$expense_item || $expense_item['invoice_id']) { // Prohibit editing not ours or invoiced items. header('Location: access_denied.php'); @@ -184,7 +184,7 @@ if ($request->isPost()) { // Now, an update. if ($err->no()) { - if (ttExpenseHelper::update(array('id'=>$cl_id,'date'=>$new_date->toString(DB_DATEFORMAT),'user_id'=>$user->getActiveUser(), + if (ttExpenseHelper::update(array('id'=>$cl_id,'date'=>$new_date->toString(DB_DATEFORMAT),'user_id'=>$user->getUser(), 'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost))) { header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); exit(); @@ -200,8 +200,8 @@ if ($request->isPost()) { // Now, a new insert. if ($err->no()) { - if (ttExpenseHelper::insert(array('date'=>$new_date->toString(DB_DATEFORMAT),'user_id'=>$user->getActiveUser(),'group_id'=>$user->getActiveGroup(), - 'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { + if (ttExpenseHelper::insert(array('date'=>$new_date->toString(DB_DATEFORMAT),'client_id'=>$cl_client, + 'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); exit(); } else