@extends('layouts.layout-horizontal') @section('title', 'Ledger - ' . $party->name) @section('content')
{{-- Print-only header --}}

{{ $party->name }}

Ledger Statement: {{ \Carbon\Carbon::parse($startDate)->format('d-M-Y') }} to {{ \Carbon\Carbon::parse($endDate)->format('d-M-Y') }} @if($party->mobile) | {{ $party->mobile }} @endif

{{-- Header / Filter Bar --}}
{{ $party->name }}
{{ $party->city ?? '' }} {{ $party->mobile ? '| ' . $party->mobile : '' }} @if($party->gst_number) | GSTIN: {{ $party->gst_number }} @endif
Receipt Payment Download @if($party->mobile) @endif Back
{{-- Summary Cards --}}
@php $totalDebit = $ledger->sum('debit') + max($netOpening, 0); $totalCredit = $ledger->sum('credit') + max(-$netOpening, 0); $closingBalance = $totalDebit - $totalCredit; @endphp
Opening Balance

{{ indian_number(abs($netOpening), 2) }} {{ $netOpening >= 0 ? 'Dr' : 'Cr' }}

Total Debit

{{ indian_number($totalDebit, 2) }}

Total Credit

{{ indian_number($totalCredit, 2) }}

Closing Balance

{{ indian_number(abs($closingBalance), 2) }} {{ $closingBalance >= 0 ? 'Dr' : 'Cr' }}

{{-- Printable Ledger Area --}}
{{-- Discount Voucher Modal --}} @endsection @push('scripts') @endpush