Back
{{-- WhatsApp Share (Summary Only) --}} @php $custPhone = $customer->phone ?? $customer->mobile ?? null; $phone = $custPhone ? preg_replace('/\D+/', '', $custPhone) : null; if($phone && str_starts_with($phone,'0')){ $phone = '93'.ltrim($phone,'0'); } $msg = "Ledger Summary\n" ."Customer: ".($customer->name ?? 'All')."\n" ."Currency: ".($currency->title_en ?? 'All')."\n" ."From: ".($fromDate ?? 'All')." To: ".($toDate ?? 'All')."\n" ."Opening: ".number_format($openingBalance,2)."\n" ."Debit: ".number_format($periodDebit,2)."\n" ."Credit: ".number_format($periodCredit,2)."\n" ."Closing: ".number_format($closingBalance,2)."\n" ."— ".($info->business_name ?? 'Company'); $waUrl = $phone ? ("https://wa.me/".$phone."?text=".urlencode($msg)) : null; @endphp @if($waUrl) WhatsApp Share @else @endif
{{-- Header --}}
{{-- Logo --}}
{{-- change this path to your real logo --}} Logo
{{ $info->business_name ?? 'Business Name' }}
{{ $info->address ?? '' }} | {{ $info->phone ?? '' }} | {{ $info->email ?? '' }}
Customer Ledger Print: {{ date('Y-m-d H:i') }}
Customer: {{ $customer->name ?? 'All Customers' }}
Currency: {{ $currency->title_en ?? 'All Currencies' }}
From: {{ $fromDate ?? 'All' }} | To: {{ $toDate ?? 'All' }}
{{-- Barcode + QR --}}
Ledger Barcode
QR
{{-- KPI --}}
Opening Balance
{{ number_format($openingBalance,2) }}
Debit (Sale)
{{ number_format($periodDebit,2) }}
Credit
{{ number_format($periodCredit,2) }}
Closing Balance
{{ number_format($closingBalance,2) }}
{{-- Table --}}
@php $running = (float)$openingBalance; @endphp @forelse($rows as $i => $r) @php $debit = (float)($r->bill_total ?? 0); $credit = (float)($r->amount ?? 0); $running = $running + $debit - $credit; $type = $trxTitles[$r->transaction_id] ?? ('TID-'.$r->transaction_id); @endphp @empty @endforelse
# Date Customer CUR Type Ref Debit Credit Running
Opening Balance {{ number_format($openingBalance,2) }}
{{ $i+1 }} {{ $r->date }} {{ $r->customer->name ?? '-' }} {{ $r->currency->title_en ?? '-' }} {{ $type }} {{ $r->module_rid }} {{ number_format($debit,2) }} {{ number_format($credit,2) }} {{ number_format($running,2) }}
No data found
{{-- Footer branding --}}
Developed by OOMCLICK Software Company | www.oomclick.com | info@oomclick.com
{{-- Barcode + QR libs --}}