@extends('layouts.app') @section('content')

Vendor Ledger

{{--

This is the most basic and cost estimation form is the default position.

--}}
@csrf
{{--

Personal Details

--}}
@php $balance = 0; @endphp @forelse ($data as $d) @php $balance=$d->bills==0 ? $balance - $d->payment : $balance + $d->bills; if($d->payment <0){ $d->payment=$d->payment * (-1); } if($d->bills <0){ $d->bills=$d->bills * (-1); } @endphp @empty @endforelse
Date Memo Debit Credit Balance
{{$d->date}} {{$d->memo}} {{$d->bills}} {{$d->payment}} PKR {{$balance}}
No record Found
@endsection @section('afterScript') @endsection