Commit 3c95e20b by hannan

remove nonchargeable in form and dashboard controller

parent 9a697d00
...@@ -415,17 +415,6 @@ class DashboardController extends Controller ...@@ -415,17 +415,6 @@ class DashboardController extends Controller
$dept = Department::where('id', $user->fk_lkp_department) $dept = Department::where('id', $user->fk_lkp_department)
->first(); ->first();
// dd(Staff_info::all());
// $hod = Staff_info::find($user->penyokong)
// ->fullname;
// $penyokong = Staff_info::where('penyokong', 0)
// ->get();
// dd($penyokong);
// $bod = Staff_info::select('id', 'fullname')
// ->whereIn('id', [1,45,46,47,48])
// ->get();
$year = date('Y'); $year = date('Y');
if(isset($request->phase)) if(isset($request->phase))
...@@ -471,7 +460,6 @@ class DashboardController extends Controller ...@@ -471,7 +460,6 @@ class DashboardController extends Controller
->get(); ->get();
$chargeablelist = []; $chargeablelist = [];
$nonchargeablelist = [];
$overheadlist = []; $overheadlist = [];
foreach($chargeableproject as $key => $value) { foreach($chargeableproject as $key => $value) {
...@@ -486,17 +474,6 @@ class DashboardController extends Controller ...@@ -486,17 +474,6 @@ class DashboardController extends Controller
} }
foreach ($nonchargeableproject as $key => $value) {
$nonchargeablelist[] = [
'pid' => $value->fk_project_id,
'pname' => $value->toProject->p_project_description,
];
}
$check = Ts_master::where('tm_staff_id', $user->staff_id) $check = Ts_master::where('tm_staff_id', $user->staff_id)
->where('tm_year', $year) ->where('tm_year', $year)
->where('tm_month', $month) ->where('tm_month', $month)
...@@ -513,11 +490,6 @@ class DashboardController extends Controller ...@@ -513,11 +490,6 @@ class DashboardController extends Controller
// ->where('td_hours', '!=', 0) // ->where('td_hours', '!=', 0)
->get(); ->get();
$nonchargehour = Ts_detail::where('fk_tm_id',$check->id)
->where('td_project_type', $nonchargeable)
// ->where('td_hours', '!=', 0)
->get();
$overheadhour = Ts_detail::where('fk_tm_id',$check->id) $overheadhour = Ts_detail::where('fk_tm_id',$check->id)
->where('td_project_type', $overhead) ->where('td_project_type', $overhead)
->where('td_hours', '!=', 0) ->where('td_hours', '!=', 0)
...@@ -559,7 +531,6 @@ class DashboardController extends Controller ...@@ -559,7 +531,6 @@ class DashboardController extends Controller
} }
$totalchargehrs = $check->tm_chargeable_hrs; $totalchargehrs = $check->tm_chargeable_hrs;
$totalnonchargehrs = $check->tm_nonchargeable_hrs;
$totaloverheadhrs = $check->tm_overhead_hrs; $totaloverheadhrs = $check->tm_overhead_hrs;
$notes = Ts_detail::where('tm_year', $year) $notes = Ts_detail::where('tm_year', $year)
...@@ -575,17 +546,15 @@ class DashboardController extends Controller ...@@ -575,17 +546,15 @@ class DashboardController extends Controller
else else
{ {
$chargehour = null; $chargehour = null;
$nonchargehour = null;
$overheadhour = null; $overheadhour = null;
$totalchargehrs = null; $totalchargehrs = null;
$totalnonchargehrs = null;
$totaloverheadhrs = null; $totaloverheadhrs = null;
$notes = null; $notes = null;
$check = null; $check = null;
} }
// dd($check->id); // dd($check->id);
return view('timesheet::dashboard.timesheetViewer', compact('curruser', 'user','profile', 'dept', 'phase', 'month', 'year', 'strMonth', 'daymonth', 'chargeablelist', 'nonchargeablelist', 'overheadlist', 'chargehour', 'nonchargehour', 'totalchargehrs', 'totalnonchargehrs', 'totaloverheadhrs', 'overheadhour', 'notes', 'check', 'strdays')); return view('timesheet::dashboard.timesheetViewer', compact('curruser', 'user','profile', 'dept', 'phase', 'month', 'year', 'strMonth', 'daymonth', 'chargeablelist', 'overheadlist', 'chargehour', 'totalchargehrs', 'totaloverheadhrs', 'overheadhour', 'notes', 'check', 'strdays'));
} }
public function tsubmit(Request $request) public function tsubmit(Request $request)
......
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