@extends('layouts.app') @section('customcss') @endsection @section('content')

{{ __('Creditors & Debtors List') }}

Total Creditors

{{ $suppliers->where('balance', '>', 0)->count() }}

Total Debtors

{{ $suppliers->where('balance', '<', 0)->count() }}

Net Balance

{{ ($netBalance ?? 0) > 0 ? 'Owing' : 'Owed' }}

Total Accounts

Active
{{ __('Supplier Balances') }}
@forelse($suppliers as $index => $supplier) @empty @endforelse
#
{{ __('Supplier Name') }} {{ __('Contact') }} {{ __('Alt Contact') }} {{ __('Balance') }} {{ __('Status') }} {{ __('Actions') }}
{{ $index + 1 }}
{{ substr($supplier->name, 0, 1) }}
{{ $supplier->contact ?? '-' }} {{ $supplier->alt_contact ?? '-' }} {{ number_format($supplier->balance, 2) }} @if($supplier->balance > 0) {{ __('Creditor') }} @else {{ __('Debtor') }} @endif
{{ __('Sorry! No Result Found') }}

{{ __('No suppliers with outstanding balances found.') }}

{{ __('TOTALS:') }}
{{ __('Creditors:') }} {{ number_format($totalCreditors ?? 0, 2) }}
{{ __('Debtors:') }} {{ number_format(abs($totalDebtors ?? 0), 2) }}
{{ __('Net:') }} {{ number_format($netBalance ?? 0, 2) }}
@endsection @section('customjs') @endsection