@extends('layouts.app') @section('content')
{{-- Header --}}

Supplier Ledger

{{ $supplier->company_name }}

← Back
{{-- Supplier Information --}}
Supplier Information
Supplier
{{ $supplier->company_name }}
Contact Person
{{ $supplier->contact_person ?: '-' }}
Mobile
{{ $supplier->mobile ?: '-' }}
GSTIN
{{ $supplier->gstin ?: '-' }}
Period
{{ \Carbon\Carbon::parse($fromDate)->format('d-m-Y') }} - {{ \Carbon\Carbon::parse($toDate)->format('d-m-Y') }}
{{-- Summary --}}
Opening Balance

₹{{ number_format( $openingBalance, 2 ) }}

Total Purchases

₹{{ number_format( $totalPurchases, 2 ) }}

Total Paid

₹{{ number_format( $totalPaid, 2 ) }}

Outstanding

₹{{ number_format( $outstanding, 2 ) }}

{{-- Filters --}}
Ledger Filters
{{-- Ledger --}}
Ledger Transactions
@forelse($ledger as $index => $transaction) @empty @endforelse
# Date Type Reference Description Debit Credit Balance
{{ $index + 1 }} @if($transaction['date']) {{ \Carbon\Carbon::parse( $transaction['date'] )->format('d-m-Y') }} @else - @endif @if($transaction['type'] === 'Purchase') Purchase @elseif( $transaction['type'] === 'Payment' ) Payment @else Opening @endif {{ $transaction['reference'] }} {{ $transaction['description'] }} @if($transaction['debit'] > 0) ₹{{ number_format( $transaction['debit'], 2 ) }} @else - @endif @if($transaction['credit'] > 0) ₹{{ number_format( $transaction['credit'], 2 ) }} @else - @endif ₹{{ number_format( $transaction['balance'], 2 ) }}
No transactions found.
Closing Balance ₹{{ number_format( $totalPurchases + $openingBalance, 2 ) }} ₹{{ number_format( $totalPaid, 2 ) }} ₹{{ number_format( $outstanding, 2 ) }}
@endsection