@extends('layout.app')
@section('title', 'Print Trip Sheet #' . $tripSheet->trip_sheet_no)
@push('header_script')
@endpush
@section('content')
Trip Sheet
@php
$statusClass = 'status-draft';
if ($tripSheet->status === 'Completed') {
$statusClass = 'status-completed';
} elseif ($tripSheet->status === 'In Progress') {
$statusClass = 'status-inprogress';
}
@endphp
{{ $tripSheet->status }}
Trip Information
Trip Sheet No:
#{{ $tripSheet->trip_sheet_no }}
Date:
{{ \Carbon\Carbon::parse($tripSheet->date)->format('d-M-Y') }}
Vehicle No:
{{ $tripSheet->vehicle->vehicle_no ?? 'N/A' }}
Driver Name:
{{ $tripSheet->driver->employee_name ?? $tripSheet->driver_name ?? 'N/A' }}
Route & Logistics
Route:
{{ $tripSheet->from_location }} → {{ $tripSheet->to_location }}
Linked LR No:
{{ $tripSheet->freightEntry ? 'LR-' . $tripSheet->freightEntry->lr_no : 'N/A' }}
KM Reading:
{{ $tripSheet->start_km ?? '-' }} → {{ $tripSheet->end_km ?? '-' }}
@if($tripSheet->total_km) ({{ $tripSheet->total_km }} km) @endif
Trip Duration:
@if($tripSheet->start_time) {{ $tripSheet->start_time->format('d/m H:i') }} @else - @endif
→
@if($tripSheet->end_time) {{ $tripSheet->end_time->format('d/m H:i') }} @else - @endif
Trip Expenses
| # |
Expense Type |
Date |
Remarks / Details |
Amount (₹) |
@forelse($tripSheet->expenses as $index => $expense)
| {{ $index + 1 }} |
{{ $expense->expense_type }} |
{{ \Carbon\Carbon::parse($expense->expense_date)->format('d-M-Y') }} |
{{ $expense->remarks ?? '-' }} |
{{ number_format($expense->amount, 2) }} |
@empty
| No expenses recorded. |
@endforelse
| Total Trip Expenses: |
₹ {{ number_format($tripSheet->total_expense, 2) }} |
Remarks / Notes
{{ $tripSheet->remarks ?: 'No remarks or special notes entered for this trip.' }}
@if($tripSheet->total_km && $tripSheet->total_km > 0)
| Cost Per KM: ₹ {{ number_format($tripSheet->total_expense / $tripSheet->total_km, 2) }} |
Income Per KM: ₹ {{ number_format($tripSheet->freight_amount / $tripSheet->total_km, 2) }} |
@endif
Financial Summary
Freight Income
₹ {{ number_format($tripSheet->freight_amount, 2) }}
Total Expenses
₹ {{ number_format($tripSheet->total_expense, 2) }}
@php $pl = $tripSheet->profit_loss; @endphp
Net PL
{{ $pl >= 0 ? '+' : '' }}₹ {{ number_format($pl, 2) }}
Prepared By / Driver
Authorized Signature
@endsection