Commit cd819ede by Azhan Hannan

display total hours & days utk footer summary report

parent adff6d72
......@@ -91,9 +91,10 @@
@if(data_get($staff,'staffid') == data_get($hours,'staffid') && data_get($value,'id') == data_get($hours,'oid'))
<!-- {{data_get($hours,'hours')}} -->
<?php $monthly_hours += data_get($hours,'hours') ?>
<?php $totalnc += data_get($hours,'hours'); ?>
<!-- <?php $totalnc += data_get($hours,'hours'); ?> -->
@endif
@endforeach
@if($monthly_hours == 0)
@else
{{$monthly_hours}}
......@@ -114,11 +115,36 @@
<th colspan="5" class="center aligned">
<strong>Total</strong>
</th>
<th colspan="{{count($chargeproject)+2+count($overhead)+2}}"></th>
<?php $tch = 0; ?>
@foreach($chargeproject as $key => $value)
<?php $currproject = $ringkasan->where('c_pid', data_get($value,'id')) ?>
<th>
<?php $totalp = 0; ?>
@foreach($staffs as $key => $staff)
@foreach($chargeproject as $key => $chargeable)
<?php $monthly_hours = 0; ?>
@foreach($currproject as $key => $value)
@if(data_get($value,'staffid') == data_get($staff,'staffid') && data_get($chargeable,'id') == data_get($value,'c_pid'))
<!-- {{data_get($value,'total_c_hours')}} -->
<?php $monthly_hours += data_get($value,'total_c_hours'); ?>
@endif
@endforeach
<!-- {{$monthly_hours}} -->
<?php $totalp += $monthly_hours; ?>
@endforeach
@endforeach
{{$totalp}}
</th>
<?php $tch += $totalp; ?>
@endforeach
<th class="text-center">{{$tch}}</th>
<th class="text-center">{{number_format($tch/8, 1, '.', '')}}</th>
<th colspan="{{count($overhead)+2}}"></th>
<th><strong>{{$totalalldays}}</strong></th>
</tr>
</tfoot>
</table>
</div>
</div>
......@@ -185,6 +211,3 @@
</style>
@endsection
\ No newline at end of file
@push('script')
@endpush
\ No newline at end of file
......@@ -84,7 +84,7 @@ class ReportController extends Controller
// dd($ovhours);
$chargeproject = VwChargeable::all();
// dd($chargeproject);
if ($request->dept == 'all') {
$staffs = VwStaff::orderby('deptID')
->where('deptID','!=', 8)
......@@ -97,7 +97,7 @@ class ReportController extends Controller
->where('deptID', $request->dept)
->get();
}
// dd($staffs);
$year = date('Y');
if ($request->year) {
$year = $request->year;
......
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