List of Timesheet for {{ $project->project_title }}
Company Address Telephone Fax E-mail
{{ $project->company->company_name }} {!! $project->company->address_line1 ? $project->company->address_line1.'
' : '' !!} {!! $project->company->address_line2 ? $project->company->address_line2.'
' : '' !!}
{{ $project->company->phone }} {{ $project->company->fax }} {{ $project->company->email }}
@php $total = 0; $total_h = 0; $total_p = 0; $total_hp = 0; $gtotal_cost = 0; $gall_total_cost = 0; $gtotal_estimate = 0; $gtotal_profit = 0; $gtotal_loss = 0; @endphp @if($labourTimesheets->isNotEmpty()) @foreach($labourTimesheets as $labourTimesheet) @php $total_estimate = 0; $total_cost = 0; $all_total_cost = 0; $all_total_hours = 0; $total_profit = 0; $total_loss = 0; $tm = 0; $profit=0; $loss=0; $gtotal_estimate = ($gtotal_estimate + $total_estimate); $gtotal_profit = ($gtotal_profit + $total_profit); $gtotal_loss = ($gtotal_loss + $total_loss); $gall_total_cost = ($gall_total_cost + $all_total_cost); $all_per_estimate = $labourTimesheet->activityOfTimesheet->selling_cost; $aph = strtok((float)$labourTimesheet->allocated_hour, ':'); $total_estimate = $aph*$all_per_estimate; $mptotal_hours = 0; $mpa_total_cost = 0; $mptmj = 0; $mpthj = 0; $eaph = strtok((float)$labourTimesheet->total_spent_hour, ':'); $eapm = substr(strstr((float)$labourTimesheet->total_spent_hour, ':'), 1); $mpa_total_cost = $eaph*$all_per_estimate; $mpph = $eaph; $mppm = $eapm; $mptmin = (($mpph*60)+$mppm); $mpminpercost = $all_per_estimate/60; $mpper_total_cost = $mptmin*$mpminpercost; $mptotal_cost = $mpper_total_cost; $mpprofit = 0; $mploss = 0; if($mptotal_cost > $total_estimate){ $mploss = ($mptotal_cost - $total_estimate); } if($mptotal_cost < $total_estimate){ $mpprofit = ($total_estimate - $mptotal_cost); } @endphp @endforeach @endif
Sub Code Activity Code Activity Allocated/Hr Total spent/hr Remaining/hr Total cost Estimate Profit Loss
{{ $labourTimesheet->subActivity->sub_code }} {{ $labourTimesheet->activityOfTimesheet->item_code }} {{ $labourTimesheet->activityOfTimesheet->activity }} {{ $labourTimesheet->allocated_hour }} {{ $labourTimesheet->total_spent_hour }} {{ $labourTimesheet->remaining_hour }} £{{ number_format($mptotal_cost,4) }} £{{ number_format($total_estimate,4) }} £{{ number_format($mpprofit,4) }} £{{ number_format($mploss,4) }}
Total Cost : £{{ number_format($gall_total_cost,4) }} Estimate : £{{ number_format($gtotal_estimate,4) }} Profit : £{{ number_format($gtotal_profit,4) }} Loss : £{{ number_format($gtotal_loss,4) }}