@extends('backend.layouts.admin') @section('main-content')
Ledger Detail: {{$booking->uid}}
{{$user_name}}
@if($booking->payment_status==1) @endif
Date Voucher # Description Debit Credit Balance
Opening Balance 0 0 0
{{$booking->created_at->format('d-m-Y')}} BS-{{$booking->id}} Booking Sale {{number_format($booking->amount)}} 0 {{number_format($booking->amount)}}
{{$booking->created_at->format('d-m-Y')}} BR-{{$booking->id}} {{ucfirst($booking->bank->name??'')}} 0 {{number_format($booking->amount)}} 0
{{number_format($booking->amount)}} {{$booking->payment_status==1?number_format($booking->amount):''}}
@php($transport_total_cost = 0)
@php($vehicle = $booking->truck_type->name) @if($sale_entry)
{{ucfirst($vehicle)}} Ton Sale
Date Voucher # Description Debit Credit Balance
Opening Balance 0 0 0
{{$sale_entry->date}} SE-{{$sale_entry->id}} {{$user_name}} {{number_format($sale_entry->debit)}} {{number_format($sale_entry->credit)}} {{number_format($sale_entry->debit-$sale_entry->credit)}}
{{number_format($sale_entry->debit)}} {{number_format($sale_entry->credit)}}
@endif @if($cost_entry)
{{ucfirst($vehicle)}} Ton Cost
@php($transport_total_cost+=$cost_entry->credit)
Date Voucher # Description Debit Credit Balance
Opening Balance 0 0 0
{{$cost_entry->date}} {{$booking->uid}} {{$cost_entry->detail['vendor']??''}} {{number_format($cost_entry->debit)}} {{number_format($cost_entry->credit)}} {{number_format($cost_entry->debit)}}
{{number_format($cost_entry->debit)}} {{number_format($cost_entry->credit)}}
@endif
@if($pay_entry)
{{ucfirst($vehicle)}} Ton Pay
@if($pay_entry && $pay_entry->debit) @endif
Date Voucher # Description Debit Credit Balance
Opening Balance 0 0 0
{{$pay_entry->date??''}} {{$booking->uid}} Transport Cost 0 {{number_format($pay_entry->credit??0)}} -{{number_format($pay_entry->credit??0)}}
{{$pay_entry->date??'-'}} {{$pay_entry->debit?'BP-'.$pay_entry->id.'':''}} {{$pay_entry->detail['bank']['name']??''}} {{number_format($pay_entry->debit??0)}} 0
{{number_format($pay_entry->debit??'0')}} {{number_format($pay_entry->credit??'0')}}
@endif
@if($booking->payment_status==1)
{{$booking->bank->name??''}}
@php($booking_total = $booking->amount) @php($credit_total = 0) @if($pay_entry) @php($transport_total_cost = $pay_entry->credit) @php($booking_total = $booking_total-$pay_entry->credit) @endif
Date Voucher # Description Debit Credit Balance
Opening Balance 0 0 0
{{$booking->created_at->format('d-m-Y')}} BR-{{$booking->id}} {{$booking->user->name??''}} {{number_format($booking_total)}} 0 {{number_format($booking_total)}}
{{$pay_entry->date}} BP-{{$pay_entry->id}} Cost 0 {{number_format($pay_entry->credit)}} {{number_format($booking_total-$pay_entry->credit)}}
{{number_format($booking->amount)}} {{number_format($transport_total_cost)}}
@endif
@endsection @push('scripts') @endpush