X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tasks.php;fp=tasks.php;h=561c1d9fb96e625fa441d67683af85836fd98745;hb=2001b81dd9d0e90d86484fa09e6ddaebb5340c0a;hp=779cb319ac8e91ae92f07694eaa6ae4acc75e1d6;hpb=ad20a13a34414a1938b285e99a3c3b0c019412aa;p=contractor-progress.git diff --git a/tasks.php b/tasks.php index 779cb31..561c1d9 100644 --- a/tasks.php +++ b/tasks.php @@ -126,6 +126,7 @@ function tasks_display_main() { case TASK_NEEDS_TESTING: case TASK_FINISHED: tem_show('price_row'); + tem_show('mark_paid_link'); # FIXME break; } } else { @@ -188,6 +189,17 @@ function tasks_edit_main() { $state = TASK_BUG; } + if(isset($_REQUEST['tasks_mark_paid_id'])) { + if(!logged_in_as_contractor()) { + message("Error: only Jason can mark tasks as paid."); + return './'; + } + $id = $_REQUEST['tasks_mark_paid_id']; + db_update('tasks', 'paid', 1, 'where id=%i', $id); + message('Marked as paid.'); + return './'; + } + if(isset($_REQUEST['tasks_approve_price_id'])) { $id = $_REQUEST['tasks_approve_price_id']; $owner = db_get_value('tasks', 'client_id', 'where id=%i', $id);;