Commit caa22b74 by Azhan Hannan

log kak hasni, deduct cuti daripada total working days.

parent 97cd3d25
......@@ -88,15 +88,30 @@
<td class="center aligned">{{ number_format($totalc/8, 1, '.', '') }}</td>
@endif
<?php $totalnc = 0; ?>
<?php $totalnc = $ocuti = 0; ?>
@foreach($overhead as $key => $value)
<td class="center aligned">
<?php $monthly_hours = 0; ?>
@foreach($ovhours as $key => $hours)
@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
$monthly_hours += data_get($hours,'hours');
if (data_get($hours,'oid') == 6) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 7) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 8) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 10) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 15) {
$ocuti += data_get($hours,'hours');
}else{
}
$totalnc += data_get($hours,'hours');
?>
@endif
@endforeach
......@@ -108,7 +123,9 @@
@endforeach
<td class="center aligned">{{ number_format($totalnc, '1', '.', '') }}</td>
<td class="center aligned">{{ number_format($totalnc/8, 1, '.', '') }}</td>
<?php $totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<?php
$totalnc -= $ocuti;
$totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<td class="center aligned">{{ number_format($totaldays, '1', '.', '') }}</td>
</tr>
</tbody>
......@@ -141,13 +158,25 @@
<th class="text-center">{{ number_format($tch, '1', '.', '') }}</th>
<th class="text-center">{{ number_format($tch/8, 1, '.', '') }}</th>
@endif
<?php $totaloverhead = 0; ?>
<?php $totaloverhead = 0;$cuti = 0; ?>
@foreach($overhead as $key => $value)
<?php
$monthly_ov = 0;
$oid = data_get($value,'id');
$ov = $ovhours->where('oid', $oid);
foreach ($ov as $key => $val) {
if (data_get($val,'oid') == 6) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 7) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 8) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 10) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 15) {
$cuti += data_get($val,'hours');
}else{
}
$monthly_ov += data_get($val,'hours');
}
?>
......
......@@ -145,15 +145,30 @@
<td class="center aligned">{{ number_format($totalc/8, 1, '.', '') }}</td>
@endif
<?php $totalnc = 0; ?>
<?php $totalnc = $ocuti = 0; ?>
@foreach($overhead as $key => $value)
<td class="center aligned">
<?php $monthly_hours = 0; ?>
@foreach($ovhours as $key => $hours)
@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
$monthly_hours += data_get($hours,'hours');
if (data_get($hours,'oid') == 6) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 7) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 8) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 10) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 15) {
$ocuti += data_get($hours,'hours');
}else{
}
$totalnc += data_get($hours,'hours');
?>
@endif
@endforeach
......@@ -165,7 +180,9 @@
@endforeach
<td class="center aligned">{{ number_format($totalnc, '1', '.', '') }}</td>
<td class="center aligned">{{ number_format($totalnc/8, 1, '.', '') }}</td>
<?php $totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<?php
$totalnc -= $ocuti;
$totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<td class="center aligned">{{ number_format($totaldays, '1', '.', '') }}</td>
</tr>
</tbody>
......@@ -198,13 +215,25 @@
<th class="text-center">{{ number_format($tch, '1', '.', '') }}</th>
<th class="text-center">{{ number_format($tch/8, 1, '.', '') }}</th>
@endif
<?php $totaloverhead = 0; ?>
<?php $totaloverhead = 0;$cuti = 0; ?>
@foreach($overhead as $key => $value)
<?php
$monthly_ov = 0;
$oid = data_get($value,'id');
$ov = $ovhours->where('oid', $oid);
foreach ($ov as $key => $val) {
if (data_get($val,'oid') == 6) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 7) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 8) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 10) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 15) {
$cuti += data_get($val,'hours');
}else{
}
$monthly_ov += data_get($val,'hours');
}
?>
......
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