@extends('layouts.master') @section('title','Account Ledger') @section('page-header') Account Ledger @stop @push('style') @endpush @section('content')
@include('partials._alert_message')

Customer Ledger

Date From {{fdate(request('from'),'d/m/Y')}} To {{fdate(request('to'),'d/m/Y')}}
@if(request('account_id')) @else @endif @php $totalDebit = 0; $totalCredit = 0; @endphp @foreach($transactions as $transaction) @php $totalDebit += $debit = $transaction->amount < 0 ? abs($transaction->amount) : 0; $totalCredit += $credit = $transaction->amount >= 0 ? $transaction->amount : 0; $balance += $transaction->amount; @endphp @endforeach
Sl Date Voucher No Description Dr. Cr. Balance
Opening Balance {{ $balance }}
NO RECORDS FOUND!
{{ $loop->iteration }} {{ $transaction->date }} {{ $transaction->invoice_no }} {{ $debit }} {{ $credit }} {{ $balance }}
Total: {{$totalDebit}} {{$totalCredit}}
@endsection