Commit 80ec8cc4 by Azhan Hannan

bug report project

parent b0cb5b4b
......@@ -50,8 +50,8 @@
<tbody>
<?php $totalhours = $totaldays = 0;?>
@foreach($pteam as $key => $team)
<?php
// dd($pteam);
$balhours = 0;
foreach ($ptstaffs as $key => $value) {
if (data_get($team,'pm_roles') == data_get($value,'roleid')) {
......@@ -59,17 +59,18 @@
}
}
?>
<tr>
<!-- <tr>
<td style="width: 10%" rowspan="{{count($count)+1}}" class="center aligned">{{data_get($team,'role.role')}}</td>
</tr>
</tr> -->
@foreach($ptstaffs as $key => $staff)
@if(data_get($team,'pm_roles') == data_get($staff,'roleid'))
<?php
$count = $ptstaffs->where('roleid', data_get($team,'pm_roles'));
$acc = $accumulate->where('staffid', data_get($staff,'staffid'));
// dump(count($count));
// dd($team);
?>
<tr>
<td class="center aligned">{{data_get($team,'role.role')}}</td>
<td class="center aligned">
{{data_get($team,'pm_days')}} Days <br>
{{data_get($team,'pm_hours')}} Hours
......
......@@ -13,9 +13,9 @@
<label>Project</label>
<select name="project" class="ui fluid dropdown" required="required">
@if($checkproj)
@foreach($proj as $key => $value)
<option value="{{ data_get($value,'id') }}">{{ data_get($value,'p_project_code') }} | {{ data_get($value,'p_project_description') }}</option>
@endforeach
@foreach($proj as $key => $value)
<option value="{{ data_get($value,'id') }}">{{ data_get($value,'p_project_code') }} | {{ data_get($value,'p_project_description') }}</option>
@endforeach
@else
<option value="noproject">No Project</option>
@endif
......
......@@ -122,20 +122,24 @@ class ReportController extends Controller
{
$checkproj = Project::where('p_project_type', 1)
->where('p_project_task_team', $user->u_staffID)
->where('deleted_at', null)
->first();
$proj = Project::where('p_project_type', 1)
->where('p_project_task_team', $user->u_staffID)
->where('deleted_at', null)
->get();
}
if($roleid != '5' && $roleid != '8')
{
$checkproj = Project::where('p_project_type', 1)
->where('deleted_at', null)
->first();
$proj = Project::where('p_project_type', 1)
->get();
->where('deleted_at', null)
->get();
}
$month = [];
......@@ -187,7 +191,7 @@ class ReportController extends Controller
->orderby('roleid')
->groupby('name')
->get();
// dd($ptstaffs);
$pteam = Pmandays::where('fk_project', $pid)
->with('role')
->orderby('pm_roles', 'ASC')
......
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