Commit 3c95e20b by hannan

remove nonchargeable in form and dashboard controller

parent 9a697d00
......@@ -415,17 +415,6 @@ class DashboardController extends Controller
$dept = Department::where('id', $user->fk_lkp_department)
->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');
if(isset($request->phase))
......@@ -471,7 +460,6 @@ class DashboardController extends Controller
->get();
$chargeablelist = [];
$nonchargeablelist = [];
$overheadlist = [];
foreach($chargeableproject as $key => $value) {
......@@ -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)
->where('tm_year', $year)
->where('tm_month', $month)
......@@ -513,11 +490,6 @@ class DashboardController extends Controller
// ->where('td_hours', '!=', 0)
->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)
->where('td_project_type', $overhead)
->where('td_hours', '!=', 0)
......@@ -559,7 +531,6 @@ class DashboardController extends Controller
}
$totalchargehrs = $check->tm_chargeable_hrs;
$totalnonchargehrs = $check->tm_nonchargeable_hrs;
$totaloverheadhrs = $check->tm_overhead_hrs;
$notes = Ts_detail::where('tm_year', $year)
......@@ -575,17 +546,15 @@ class DashboardController extends Controller
else
{
$chargehour = null;
$nonchargehour = null;
$overheadhour = null;
$totalchargehrs = null;
$totalnonchargehrs = null;
$totaloverheadhrs = null;
$notes = null;
$check = null;
}
// 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)
......
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