@extends('layouts.app') @section('title', 'Customer Statement') @push('styles') @endpush @section('content') @can('view_customer_statement')
Customer transaction & payment history
Opening Balance
${{ number_format($openingBalance, 2) }}
Sales Total
${{ number_format($totalDebit, 2) }}
Payments Total
${{ number_format($totalPaid, 2) }}
Closing Balance
${{ number_format($closingBalance, 2) }}
{{ displayDate(\Carbon\Carbon::parse($dateFrom)) }} — {{ displayDate(\Carbon\Carbon::parse($dateTo)) }}
| Date | Invoice | Type / Method | Sale Amount | Paid | Running Balance | |
|---|---|---|---|---|---|---|
| Opening Balance | ${{ number_format($runningBalance, 2) }} | |||||
| {{ displayDate($txn['date']) }} | {{ $txn['ref'] }} | @if($txn['type'] === 'sale')Sale @if(isset($txn['payment_method']) && $txn['payment_method']) ({{ $txn['payment_method'] }}) @endif | @elsePayment @if(isset($txn['payment_method']) && $txn['payment_method']) ({{ $txn['payment_method'] }}) @endif | @endif@if($txn['debit'] > 0)${{ number_format($txn['debit'], 2) }}@else - @endif | @if($txn['paid'] > 0)${{ number_format($txn['paid'], 2) }}@else - @endif | ${{ number_format($runningBalance, 2) }} |
|
No transactions for selected period |
||||||
| Closing Balance | ${{ number_format($totalDebit, 2) }} | ${{ number_format($totalPaid, 2) }} | ${{ number_format($closingBalance, 2) }} | |||