Commit 4b14d2a2 by Azhan Hannan

timesheet viewer -> total chargeable all, overhead all & A+B. display before…

timesheet viewer -> total chargeable all, overhead all & A+B. display before save chargeable/overhead.
parent b7a75e4f
...@@ -174,6 +174,7 @@ ...@@ -174,6 +174,7 @@
</tbody> </tbody>
<tfoot> <tfoot>
<th colspan="3">Total (A)</th> <th colspan="3">Total (A)</th>
<?php $totalchargeableall = 0; ?>
@if($phase == 1) @if($phase == 1)
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
<?php <?php
...@@ -186,6 +187,7 @@ ...@@ -186,6 +187,7 @@
foreach($valcbyday as $key => $value) { foreach($valcbyday as $key => $value) {
$totalcbyday += data_get($value,'td_hours'); $totalcbyday += data_get($value,'td_hours');
} }
$totalchargeableall += $totalcbyday;
} }
?> ?>
<th>{{ number_format($totalcbyday, '1', '.', '') }}</th> <th>{{ number_format($totalcbyday, '1', '.', '') }}</th>
...@@ -202,14 +204,15 @@ ...@@ -202,14 +204,15 @@
foreach($valcbyday as $key => $value) { foreach($valcbyday as $key => $value) {
$totalcbyday += data_get($value,'td_hours'); $totalcbyday += data_get($value,'td_hours');
} }
$totalchargeableall += $totalcbyday;
} }
?> ?>
<th>{{ number_format($totalcbyday, '1', '.', '') }}</th> <th>{{ number_format($totalcbyday, '1', '.', '') }}</th>
@endfor @endfor
@endif @endif
<th style="width: 5%">@if($totalchargehrs){{ number_format($totalchargehrs, 1, '.', '') }}@else 0 @endif</th> <th style="width: 5%">@if($totalchargeableall){{ number_format($totalchargeableall, 1, '.', '') }}@else 0 @endif</th>
<th style="width: 5%">@if($totalchargehrs){{ number_format($totalchargehrs/8, 1, '.', '') }}@else 0 @endif</th> <th style="width: 5%">@if($totalchargeableall){{ number_format($totalchargeableall/8, 1, '.', '') }}@else 0 @endif</th>
</tfoot> </tfoot>
</table> </table>
</div> </div>
...@@ -330,6 +333,7 @@ ...@@ -330,6 +333,7 @@
</tbody> </tbody>
<tfoot> <tfoot>
<th colspan="2">Total (B)</th> <th colspan="2">Total (B)</th>
<?php $totaloverheadall = 0; ?>
@if($phase == 1) @if($phase == 1)
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
<?php <?php
...@@ -342,6 +346,7 @@ ...@@ -342,6 +346,7 @@
foreach($valoverheadbyday as $key => $value) { foreach($valoverheadbyday as $key => $value) {
$totaloverheadbyday += data_get($value,'td_hours'); $totaloverheadbyday += data_get($value,'td_hours');
} }
$totaloverheadall += $totaloverheadbyday;
} }
?> ?>
<th style="width: 4%">{{ number_format($totaloverheadbyday, 1, '.', '') }}</th> <th style="width: 4%">{{ number_format($totaloverheadbyday, 1, '.', '') }}</th>
...@@ -358,13 +363,17 @@ ...@@ -358,13 +363,17 @@
foreach($valoverheadbyday as $key => $value) { foreach($valoverheadbyday as $key => $value) {
$totaloverheadbyday += data_get($value,'td_hours'); $totaloverheadbyday += data_get($value,'td_hours');
} }
$totaloverheadall += $totaloverheadbyday;
} }
?> ?>
<th style="width: 4%">{{ number_format($totaloverheadbyday, '1', '.', '') }}</th> <th style="width: 4%">{{ number_format($totaloverheadbyday, '1', '.', '') }}</th>
@endfor @endfor
@endif @endif
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs, 1, '.', '') }} @else 0 @endif</th> <?php
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th> // dd($totaloverheadhrs);
?>
<th style="width: 5%">@if($totaloverheadall) {{ number_format($totaloverheadall, 1, '.', '') }} @endif</th>
<th style="width: 5%">@if($totaloverheadall) {{ number_format($totaloverheadall/8, 1, '.', '') }} @endif</th>
</tfoot> </tfoot>
</table> </table>
</div> </div>
...@@ -495,8 +504,8 @@ ...@@ -495,8 +504,8 @@
<td style="width: 4%;">{{ number_format($ac, '1', '.', '') }}</td> <td style="width: 4%;">{{ number_format($ac, '1', '.', '') }}</td>
@endfor @endfor
@endif @endif
<td style="width: 5%;"> @if($check) {{ number_format(($totalchargehrs + $totaloverheadhrs), 1, '.', '') }} @else 0 @endif </td> <td style="width: 5%;"> @if($check) {{ number_format(($totalchargeableall + $totaloverheadall), 1, '.', '') }} @else 0 @endif </td>
<td style="width: 5%;"> {{ number_format(($totalchargehrs + $totaloverheadhrs)/8, 1, '.', '') }} </td> <td style="width: 5%;"> {{ number_format(($totalchargeableall + $totaloverheadall)/8, 1, '.', '') }} </td>
</tr> </tr>
<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