Commit 10cbb645 by hannan

coding checking before update to dev

parent b2b277ba
...@@ -103,7 +103,7 @@ input[type=number] { ...@@ -103,7 +103,7 @@ input[type=number] {
->where('tm_phase',$phase) ->where('tm_phase',$phase)
->first(); ->first();
$total += $valuehour->td_hours; $total += data_get($valuehour,'td_hours');
} }
?> ?>
......
...@@ -130,7 +130,7 @@ input[type=number] { ...@@ -130,7 +130,7 @@ input[type=number] {
->where('tm_phase',$phase) ->where('tm_phase',$phase)
->first(); ->first();
$total += $valuehour->td_hours; $total += data_get($valuehour,'td_hours');
} }
?> ?>
......
...@@ -58,7 +58,7 @@ input[type=number] { ...@@ -58,7 +58,7 @@ input[type=number] {
</th> </th>
</tr> </tr>
<tr> <tr>
<th class="single line">Project Name</th> <th class="single line">Task</th>
@if($phase == 1) @if($phase == 1)
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
......
...@@ -634,7 +634,7 @@ class DashboardController extends Controller ...@@ -634,7 +634,7 @@ class DashboardController extends Controller
//update hours to null //update hours to null
$checkTimesheetDetail->td_hours = $valuehour; $checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userI; $checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update(); $checkTimesheetDetail->update();
} //kalau takde, isi semua. } //kalau takde, isi semua.
...@@ -645,7 +645,7 @@ class DashboardController extends Controller ...@@ -645,7 +645,7 @@ class DashboardController extends Controller
$tmdetail->td_date = $date; $tmdetail->td_date = $date;
$tmdetail->td_project = $projectid; $tmdetail->td_project = $projectid;
$tmdetail->fk_tm_id = $tmasterid; $tmdetail->fk_tm_id = $tmasterid;
$tmdetail->tm_staff_id = $userI; $tmdetail->tm_staff_id = $userId;
$tmdetail->tm_month = $check->tm_month; $tmdetail->tm_month = $check->tm_month;
$tmdetail->tm_year = $check->tm_year; $tmdetail->tm_year = $check->tm_year;
$tmdetail->tm_phase = $check->tm_phase; $tmdetail->tm_phase = $check->tm_phase;
...@@ -656,7 +656,7 @@ class DashboardController extends Controller ...@@ -656,7 +656,7 @@ class DashboardController extends Controller
$tmdetail->td_project_name = $project->p_project_description; $tmdetail->td_project_name = $project->p_project_description;
$tmdetail->td_hours = $valuehour; $tmdetail->td_hours = $valuehour;
$tmdetail->updated_by = $userI; $tmdetail->updated_by = $userId;
$tmdetail->save(); $tmdetail->save();
//$tmdetail -> kjhdiwhdf; //$tmdetail -> kjhdiwhdf;
...@@ -696,7 +696,7 @@ class DashboardController extends Controller ...@@ -696,7 +696,7 @@ class DashboardController extends Controller
->u_staffID; ->u_staffID;
// check table master. untuk total chargeable hours. // check table master. untuk total chargeable hours.
$check = Ts_master::where('tm_staff_id', $userI) $check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $request->year) ->where('tm_year', $request->year)
->where('tm_month', $request->month) ->where('tm_month', $request->month)
->where('tm_phase', $request->phase) ->where('tm_phase', $request->phase)
...@@ -713,11 +713,11 @@ class DashboardController extends Controller ...@@ -713,11 +713,11 @@ class DashboardController extends Controller
else else
{ {
$check = new Ts_master; $check = new Ts_master;
$check->tm_staff_id = $userI; $check->tm_staff_id = $userId;
$check->tm_year = $request->year; $check->tm_year = $request->year;
$check->tm_month = $request->month; $check->tm_month = $request->month;
$check->tm_phase = $request->phase; $check->tm_phase = $request->phase;
$check->updated_by = $userI; $check->updated_by = $userId;
// $check ->tm_chargeable_hrs = ; // $check ->tm_chargeable_hrs = ;
$check->save(); $check->save();
...@@ -756,7 +756,7 @@ class DashboardController extends Controller ...@@ -756,7 +756,7 @@ class DashboardController extends Controller
//update hours to null //update hours to null
$checkTimesheetDetail->td_hours = $valuehour; $checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userI; $checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update(); $checkTimesheetDetail->update();
} //kalau takde, isi semua. } //kalau takde, isi semua.
...@@ -767,12 +767,12 @@ class DashboardController extends Controller ...@@ -767,12 +767,12 @@ class DashboardController extends Controller
$tmdetail->td_date = $date; $tmdetail->td_date = $date;
$tmdetail->fk_o_id = $projectid; $tmdetail->fk_o_id = $projectid;
$tmdetail->fk_tm_id = $tmasterid; $tmdetail->fk_tm_id = $tmasterid;
$tmdetail->tm_staff_id = $userI; $tmdetail->tm_staff_id = $userId;
$tmdetail->tm_month = $check->tm_month; $tmdetail->tm_month = $check->tm_month;
$tmdetail->tm_year = $check->tm_year; $tmdetail->tm_year = $check->tm_year;
$tmdetail->tm_phase = $check->tm_phase; $tmdetail->tm_phase = $check->tm_phase;
$tmdetail->td_project_type = $overhead; $tmdetail->td_project_type = $overhead;
$tmdetail->updated_by = $userI; $tmdetail->updated_by = $userId;
$project = Overhead::where('id', $projectid) $project = Overhead::where('id', $projectid)
->first(); ->first();
...@@ -841,7 +841,7 @@ class DashboardController extends Controller ...@@ -841,7 +841,7 @@ class DashboardController extends Controller
$data = new Overhead; $data = new Overhead;
$data->o_overhead_desc = $request->overheadlookup; $data->o_overhead_desc = $request->overheadlookup;
$data->o_overhead_sts = $request->status; $data->o_overhead_sts = $request->status;
$data->updated_by = $userI; $data->updated_by = $userId;
$data->save(); $data->save();
return redirect()->route('timesheet::dashboard.senaraiOverhead') return redirect()->route('timesheet::dashboard.senaraiOverhead')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment