Commit aa623997 by Azhan Hannan

changes report project

parent 362e9954
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
<th style="width: 10%" class="center aligned" rowspan="2">role</th> <th style="width: 10%" class="center aligned" rowspan="2">role</th>
<th style="width: 10%" class="center aligned" rowspan="2">allocation</th> <th style="width: 10%" class="center aligned" rowspan="2">allocation</th>
<th style="width: 10%" class="center aligned" rowspan="2">total accumulate</th> <th style="width: 10%" class="center aligned" rowspan="2">total accumulate</th>
<th style="width: 10%" class="center aligned" rowspan="2">balance</th>
<th style="width: 15%" class="center aligned" rowspan="2">staff name</th> <th style="width: 15%" class="center aligned" rowspan="2">staff name</th>
<th style="width: 20%" class="center aligned" colspan="2">Mandays</th> <th style="width: 20%" class="center aligned" colspan="2">Mandays</th>
<th style="width: 10%" class="center aligned" rowspan="2">balance</th>
</tr> </tr>
<tr> <tr>
<th style="width: 15%" class="center aligned">total hours</th> <th style="width: 15%" class="center aligned">total hours</th>
...@@ -125,13 +125,7 @@ ...@@ -125,13 +125,7 @@
{{ number_format($accumulatehours, 1, '.', '') }} Hours <br> {{ number_format($accumulatehours, 1, '.', '') }} Hours <br>
{{ number_format($accumulatehours/8, 1, '.', '') }} Days {{ number_format($accumulatehours/8, 1, '.', '') }} Days
</td> </td>
<td rowspan="{{count($pteam)+1}}" class="center aligned"> <?php $count = 0; ?>
<?php
$balancehours = data_get($role,'pm_hours') - $accumulatehours;
?>
{{ number_format($balancehours, '1', '.', '') }} Hours <br>
{{ number_format($balancehours/8, '1', '.', '') }} Days
</td>
@foreach($pteam as $key => $team) @foreach($pteam as $key => $team)
<tr> <tr>
<td> <td>
...@@ -139,7 +133,7 @@ ...@@ -139,7 +133,7 @@
</td> </td>
<td class="center aligned"> <td class="center aligned">
<?php <?php
// dd($team); // dd($count);
$currhour = 0; $currhour = 0;
$currmonthhours = $currentmonthhours->where('staffid', data_get($team,'pt_staff_id')); $currmonthhours = $currentmonthhours->where('staffid', data_get($team,'pt_staff_id'));
foreach ($currmonthhours as $key => $hours) { foreach ($currmonthhours as $key => $hours) {
...@@ -152,6 +146,19 @@ ...@@ -152,6 +146,19 @@
<td class="center aligned"> <td class="center aligned">
{{ number_format($currhour/8, '1', '.', '') }} Days {{ number_format($currhour/8, '1', '.', '') }} Days
</td> </td>
@if($count == 0)
<td rowspan="{{count($pteam)}}" class="center aligned">
<?php
$balancehours = data_get($role,'pm_hours') - $accumulatehours;
?>
{{ number_format($balancehours, '1', '.', '') }} Hours <br>
{{ number_format($balancehours/8, '1', '.', '') }} Days
</td>
@else
@endif
<?php
$count++;
?>
</tr> </tr>
@endforeach @endforeach
</tr> </tr>
......
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