Commit 7ede79b3 by Azhan Hannan

report summary - display department name

parent 00fc052b
......@@ -63,6 +63,11 @@
<div class="ringkasantable">
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%"> Department</th>
<th style="width: 1%">:</th>
<th style="width: 89%"> {{ $deptname }}</th>
</tr>
<tr>
<th style="width: 10%"> Month/Year</th>
<th style="width: 1%">:</th>
......
......@@ -82,6 +82,15 @@ class ReportController extends Controller
}
$dept = $request->dept;
if ($dept == 'all') {
$deptname = 'All Staffs';
} else {
$deptname = Department::select('description')
->where('id', $dept)
->first()
->description;
}
$ringkasan = VwRingkasanLaporan::where('month', $request->month)
->where('year', $request->year)
->where('status', 4)
......@@ -152,7 +161,7 @@ class ReportController extends Controller
$month = date('F', mktime(0,0,0,$request->month, 1, date('Y')));
return view('timesheet::report.ringkasan', compact('intmonth','month', 'year','ringkasan', 'chargeproject', 'staffs', 'overhead', 'ovhours', 'chargeprojects', 'chargehours', 'dept', 'deptlist', 'yearlist', 'monthlist'));
return view('timesheet::report.ringkasan', compact('intmonth','month', 'year','ringkasan', 'chargeproject', 'staffs', 'overhead', 'ovhours', 'chargeprojects', 'chargehours', 'dept', 'deptlist', 'yearlist', 'monthlist', 'deptname'));
}
public function projectreport()
......
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