@extends('backend.layouts.admin') @section('main-content')
Ledger: Vendor
{{ucfirst($vendor_name)}}
@php($balance =0) @foreach($vendor_payments as $row) @php($balance+= ($row->debit-$row->credit)) @if($row->debit) @endif @endforeach
Date Voucher # Description Debit Credit Balance
Opening Balance 0 0 0
{{$row->date}} {{$row->booking->uid??''}} {{ucfirst($row->type)}} Cost 0 {{number_format($row->credit)}} -{{number_format($row->credit)}}
{{$row->date}} BP-{{$row->id??''}} {{$row->detail['bank']['name']??'Cash'}} {{number_format($row->debit)}} 0 {{number_format($balance)}}
{{number_format($vendor_payments->sum('debit'))}} {{number_format($vendor_payments->sum('credit'))}} {{number_format($balance)}}
@endsection @push('scripts') @endpush