projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Starting working on extending custom fields.
[timetracker.git]
/
expense_edit.php
diff --git
a/expense_edit.php
b/expense_edit.php
index
b1115f1
..
3cebac1
100644
(file)
--- a/
expense_edit.php
+++ b/
expense_edit.php
@@
-45,8
+45,8
@@
if (!$user->isPluginEnabled('ex')) {
$cl_id = (int)$request->getParameter('id');
// Get the expense item we are editing.
$expense_item = ttExpenseHelper::getItem($cl_id);
$cl_id = (int)$request->getParameter('id');
// Get the expense item we are editing.
$expense_item = ttExpenseHelper::getItem($cl_id);
-if (!$expense_item || $expense_item['invoice_id']) {
- // Prohibit editing not ours or invoiced items.
+if (!$expense_item || $expense_item['
approved'] || $expense_item['
invoice_id']) {
+ // Prohibit editing not ours
, approved,
or invoiced items.
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
@@
-160,7
+160,7
@@
$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get(
if ($request->isPost()) {
// Validate user input.
if ($request->isPost()) {
// Validate user input.
- if ($user->isPluginEnabled('cl') && $user->is
PluginEnabled('cm
') && !$cl_client)
+ if ($user->isPluginEnabled('cl') && $user->is
OptionEnabled('client_required
') && !$cl_client)
$err->add($i18n->get('error.client'));
if ($show_project && !$cl_project)
$err->add($i18n->get('error.project'));
$err->add($i18n->get('error.client'));
if ($show_project && !$cl_project)
$err->add($i18n->get('error.project'));