@extends('frontend.user.layouts.main') @section('title','bookings') {{-- --}} @section('content')

Finance

Payable

Total : {{ $totalReceivable }}
Paid : {{ $totalReceivablePaid }}
Pending : {{ $totalReceivableUnpaid }}

Receivable

Total : {{ $totalPayable }}
Received : {{ $totalPayablePaid }}
Pending : {{ $totalPayableUnpaid }}

Balance

Total : {{ abs($balance) }}
@if ($balance > 0) Loadx has to pay Driver @elseif($balance < 0) Driver has to pay Loadx @else No balance remaining @endif
 
@foreach($paginated as $row) @php($loadxShare = $row['booking'] ? $row['booking']['amount'] - $row['booking']['driver_amount'] : 0) @endforeach
Sr No. Booking ID Date Payment Type Job Amount Loadx Share Driver Share Settlement Status
{{ $loop->iteration }} {{ $row['booking']['uid'] ?? '-' }} {{ \Carbon\Carbon::parse($row['created_at'])->format('d-m-Y') }} {{ $row['booking'] ? ($row['booking']['payment_method'] === 'cash' ? 'Cash' : 'Card') : '-' }} {{ $row['booking']['amount'] }} {{ $loadxShare }} {{ $row['booking']['driver_amount'] }} @if($row['type'] == 'receivable') {{ $row['receivable_amount'] }} (Payable to Loadx) @else {{ $row['payable_amount'] }} (Receivable from Loadx) @endif @if($row['amount_status'] == 'Paid') @if($row['type'] == 'receivable') Paid @else Received @endif @else Unpaid @endif
{{-- {{$bookings->links()}} --}} @if($paginated->lastPage() > 1)
    @for ($i = 1; $i <= $paginated->lastPage(); $i++)
  • {{ $i }}
  • @endfor
@endif
@endsection @push('css') @endpush