Commit a5916ce8 by hannan

summary, department and project report page, remove non-chargeable

parent 3c95e20b
......@@ -69,28 +69,6 @@
?>
@endif
@endforeach
<?php
$nonchargeproject = $project->where('ptype', 2);
$nonchargehours = $nonchargedays = 0;
?>
@foreach($nonchargeproject as $key => $nonchargeable)
@if(data_get($nonchargeable,'staffid') == data_get($staff,'staffid'))
<tr>
<td style="width: 35%"></td>
<td style="width: 5%" class="center aligned">NC</td>
<td style="width: 15%" class="center aligned">{{data_get($nonchargeable,'pcode')}}</td>
<td style="width: 25%">{{data_get($nonchargeable,'pname')}}</td>
<td style="width: 10%" class="center aligned">{{data_get($nonchargeable,'hours')}}</td>
<td style="width: 10%" class="center aligned">{{number_format(data_get($nonchargeable,'hours')/8, '1', '.', '')}}</td>
</tr>
<?php
$nonchargehours += data_get($nonchargeable,'hours');
$nonchargedays += number_format(data_get($nonchargeable,'hours')/8, '1', '.', '');
?>
@endif
@endforeach
<?php
$overheadhours = $overheaddays = 0;
......@@ -114,8 +92,8 @@
@endforeach
<?php
$staffhours = $chargehours+$nonchargehours+$overheadhours;
$staffdays = $chargedays+$nonchargedays+$overheaddays;
$staffhours = $chargehours+$overheadhours;
$staffdays = $chargedays+$overheaddays;
?>
<tr>
<td colspan="3"></td>
......
......@@ -30,7 +30,7 @@
<tr>
<th colspan="5"></th>
<th colspan="{{count($chargeproject)+2}}" class="center aligned">Chargeable</th>
<th colspan="{{count($overhead)+3}}" class="center aligned">Non-Chargeable</th>
<th colspan="{{count($overhead)+2}}" class="center aligned">Non-Chargeable</th>
<th rowspan="2" class="center aligned">Total (Working Days)</th>
</tr>
<tr>
......@@ -46,7 +46,6 @@
@endforeach
<th>Total Hours</th>
<th>Total Days</th>
<th class="center aligned">Project</th>
@foreach($overhead as $key => $value)
<th>{{data_get($value,'o_overhead_desc')}}</th>
@endforeach
......@@ -54,6 +53,7 @@
<th>Total Days</th>
</tr>
</thead>
<?php $totaldays = $totalalldays = 0; ?>
@foreach($staffs as $key => $staff)
<tbody>
......@@ -76,15 +76,8 @@
@endforeach
<td class="center aligned">{{$totalc}}</td>
<td class="center aligned">{{number_format($totalc/8, 1, '.', '')}}</td>
<td class="center aligned">
<?php $totalnc = 0; ?>
@foreach($projectnc as $key => $project)
@if(data_get($project,'staffid') == data_get($staff,'staffid'))
{{data_get($project,'nonchargehours')}}
<?php $totalnc += data_get($project,'nonchargehours'); ?>
@endif
@endforeach
</td>
<?php $totalnc = 0; ?>
@foreach($overhead as $key => $value)
<td>
@foreach($ovhours as $key => $hours)
......@@ -103,15 +96,17 @@
</tbody>
<?php $totalalldays += $totaldays; ?>
@endforeach
<tfoot>
<tr>
<th colspan="5" class="center aligned">
<strong>Total</strong>
</th>
<th colspan="{{count($chargeproject)+2+count($overhead)+3}}"></th>
<th colspan="{{count($chargeproject)+2+count($overhead)+2}}"></th>
<th><strong>{{$totalalldays}}</strong></th>
</tr>
</tfoot>
</table>
</div>
</div>
......
......@@ -65,9 +65,9 @@ class ReportController extends Controller
->where('year', $request->year)
->get();
$projectnc = VwNonchargeSummary::where('month', $request->month)
->where('year', $request->year)
->get();
// $projectnc = VwNonchargeSummary::where('month', $request->month)
// ->where('year', $request->year)
// ->get();
$overhead = Overhead::where('o_overhead_sts', 1)->get();
// dd($overhead);
......@@ -91,7 +91,7 @@ class ReportController extends Controller
$month = date('F', mktime(0,0,0,$request->month, 1, date('Y')));
return view('timesheet::report.ringkasan', compact('intmonth','month', 'year','ringkasan', 'chargeproject', 'staffs', 'projectnc', 'overhead', 'ovhours'));
return view('timesheet::report.ringkasan', compact('intmonth','month', 'year','ringkasan', 'chargeproject', 'staffs', 'overhead', 'ovhours'));
}
public function projectreport()
......
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