X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=expenses.php;h=15ccad5e9a98d51696e9d2b2d4c03ffc0d37650f;hb=c46106d305d91e93fb63c0d601a5a006a02bb63a;hp=8943fa99f05d6c3baa19758099449b73eaaa65b4;hpb=e4896c39b96b7ff311d61a36cf9128ebb305a24b;p=timetracker.git diff --git a/expenses.php b/expenses.php index 8943fa99..15ccad5e 100644 --- a/expenses.php +++ b/expenses.php @@ -98,8 +98,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t 'value'=>$cl_project, 'data'=>$project_list, 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->getKey('dropdown.select')) - )); + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); // Dropdown for clients if the clients plugin is enabled. if (in_array('cl', explode(',', $user->plugins))) { @@ -134,7 +133,7 @@ $form->addInput(array('type'=>'calendar','name'=>'date','highlight'=>'expenses', $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. $form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->getKey('button.submit'))); -// Determine lock date. Time entries earlier than lock date cannot be created or modified. +// Determine lock date. Time entries earlier than lock date cannot be created or modified. $lock_interval = $user->lock_interval; $lockdate = 0; if ($lock_interval > 0) { @@ -167,7 +166,7 @@ if ($request->getMethod() == 'POST') { $errors->add($i18n->getKey('error.period_locked')); // Insert record. - if ($errors->isEmpty()) { + if ($errors->no()) { if (ttExpenseHelper::insert(array('date'=>$cl_date,'user_id'=>$user->getActiveUser(), 'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { header('Location: expenses.php');