Commit 6b2c86d2 by Azhan Hannan

Display mandays dalam screen laporan project

parent 1baa4d3d
......@@ -50,8 +50,8 @@
<tr>
<th><strong>Total</strong></th>
<th></th>
<th><strong>{{$totalhours}}</strong></th>
<th><strong>{{$totaldays}}</strong></th>
<th><strong>{{$totalhours}} / {{data_get($pdetail,'mandays.p_total_hours')}}</strong></th>
<th><strong>{{$totaldays}} / {{data_get($pdetail,'mandays.p_total_days')}}</strong></th>
</tr>
</tfoot>
</table>
\ No newline at end of file
......@@ -68,8 +68,8 @@
<tr>
<th style="width: 40%"><strong>Total</strong></th>
<th style="width: 30%"></th>
<th style="width: 15%" class="center aligned"><strong>{{$totalhours}}</strong></th>
<th style="width: 15%" class="center aligned"><strong>{{$totaldays}}</strong></th>
<th style="width: 15%" class="center aligned"><strong>{{$totalhours}} / {{data_get($pdetail,'mandays.p_total_hours')}}</strong></th>
<th style="width: 15%" class="center aligned"><strong>{{$totaldays}} / {{data_get($pdetail,'mandays.p_total_days')}}</strong></th>
</tr>
</tfoot>
</table>
......
......@@ -66,6 +66,7 @@ class ExportController extends Controller
$month = date('F', mktime(0,0,0,$request->month, 1, date('Y')));
$year = strval($request->year);
$pdetail = VwProject::where('pid', $request->pid)
->with('mandays')
->first();
......
......@@ -119,8 +119,9 @@ class ReportController extends Controller
$pid = $request->project;
$pdetail = VwProject::where('pid', $request->project)
->with('mandays')
->first();
// dd($pdetail);
$pteam = VwProject::where('pid', $request->project)
->where('roleid', '<>', '7')
->orderby('roleid')
......
......@@ -27,5 +27,9 @@ class VwProject extends Model
}
public function mandays()
{
return $this->hasOne('Portal\Timesheet\Model\Project','id','pid');
}
}
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