- if ($err->no()) {
- /*
- // TODO: coding ongoing down from here.
- if ($request->getParameter('btn_save')) {
- $existing_project = ttProjectHelper::getProjectByName($cl_name);
- if (!$existing_project || ($cl_project_id == $existing_project['id'])) {
- // Update project information.
- if (ttProjectHelper::update(array(
- 'id' => $cl_project_id,
+ if ($request->getParameter('btn_save')) {
+ if ($err->no()) {
+ $existing_timesheet = ttTimesheetHelper::getTimesheetByName($cl_name);
+ if (!$existing_timesheet || ($cl_timesheet_id == $existing_timesheet['id'])) {
+ // Update timesheet information.
+ if (ttTimesheetHelper::update(array(
+ 'id' => $cl_timesheet_id,