@extends('pdf.layout') @section('title', 'Supplier Balances Report') @section('meta-info') @if (isset($start_date) && isset($end_date))
Period: {{ $start_date }} to {{ $end_date }}
@elsePeriod: All Time
@endifTotal Suppliers: {{ count($balances) }}
@endsection @section('content')| # | Supplier Code | Supplier Name | Collections | Payments | Balance |
|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $balance['supplier_code'] }} | {{ $balance['supplier_name'] }} | {{ number_format($balance['total_collections'], 2) }} | {{ number_format($balance['total_payments'], 2) }} | {{ number_format(abs($balance['balance']), 2) }} |
| No supplier data available | |||||
| TOTAL: | {{ number_format(array_sum(array_column($balances, 'total_collections')), 2) }} | {{ number_format(array_sum(array_column($balances, 'total_payments')), 2) }} | {{ number_format(abs(array_sum(array_column($balances, 'balance'))), 2) }} | ||