Commit 80ec8cc4 by Azhan Hannan

bug report project

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