Project - Hours Report

{{-- Project Multi-Select --}}
{{-- Project Category --}}
{{-- Start Date --}}
{{-- --}}
{{-- End Date --}}
{{-- --}}
{{-- Submit --}}
{{-- --}} @foreach ($data['project_data'] as $row) @php // Condition: if actual > planned → red row, else green row $rowColor = $row->actual_hrs > $row->planned_hrs ? '#fff2f3' : '#d4edda'; // You can use Bootstrap alert colors: red-ish (#f8d7da) and green-ish (#d4edda) @endphp @endforeach {{-- START: Added Grand Total Footer --}} {{-- END: Added Grand Total Footer --}}
Project Name Project Category Total Assigned Task Hrs Total Spent Task Hrs Assigned Hrs (Completed Tasks) Spent Hrs (Completed Tasks) Status Total Cost
{{ $row->project_name }} {{ $row->category_name ?? '---' }} {{ number_format($row->planned_hrs, 2) }} {{ number_format($row->actual_hrs, 2) }} {{ number_format($row->assigned_completed_hrs, 2) }} {{ number_format($row->spent_completed_hrs, 2) }} {{ number_format($row->total_cost, 2) }}
Grand Total: {{ number_format($grandTotalCost, 2) }}
Note:
  • Total Assigned Task Hrs: The total estimated hours assigned for all tasks in the project.
  • Total Spent Task Hrs: This is the total actual hours worked on all tasks for that project, based on entries in the time_sheets table.
    Green means spent hours are less than or equal to assigned hours,
    Red means spent hours is more then assigned hours.
  • Assigned Hrs (Completed Tasks): Estimated hours for tasks marked as completed.
  • Spent Hrs (Completed Tasks): Actual hours logged in the time_sheets table for tasks that are completed
@endsection @section('onPageJs') @endsection