@php $contactPermissionPrefix = ($contactType ?? '') === 'customer' ? 'customers' : 'suppliers'; $canViewContactMoney = auth()->user()->hasPermission($contactPermissionPrefix.'.view_balances'); @endphp
{{ $title }}
@if(($contactType ?? '') !== 'supplier') @endif @if(!empty($showActivationButton)) License Activation @endif
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
@csrf
@if(($contactType ?? '') === 'customer')
@endif @if(($contactType ?? '') === 'supplier')
@if($canViewContactMoney)
@endif @endif
Reset
Available {{ $title }} {{ number_format(method_exists($records, 'total') ? $records->total() : $records->count()) }} records
@if(($contactType ?? '') === 'customer')@endif @if(($contactType ?? '') === 'customer' && $canViewContactMoney) @endif @if(($contactType ?? '') === 'supplier' && $canViewContactMoney) @endif @forelse($records as $record) @if(($contactType ?? '') === 'customer')@endif @if(($contactType ?? '') === 'customer' && $canViewContactMoney) @endif @if(($contactType ?? '') === 'supplier' && $canViewContactMoney) @php $openingPaid = (float) ($record->opening_balance_paid ?? 0); $openingDue = $record->opening_balance_due; $purchaseDue = max((float) ($record->purchase_balance ?? 0), 0); $totalPayable = $openingDue + $purchaseDue; @endphp @endif @empty @endforelse
Name Phone Email AddressPINBranchAvailable Advance Pending BalanceOpening Balance Opening Due Purchase Due Total PayableStatus Action
{{ $record->name }} {{ $record->phone ?: '-' }} {{ $record->email ?: '-' }} {{ $record->address ?: '-' }}{{ $record->tax_pin ?: '-' }}{{ $record->branch?->name ?: 'Unassigned' }}{{ \App\Models\SystemSetting::formatMoney(max(0, (float) $record->available_advance)) }} {{ \App\Models\SystemSetting::formatMoney((float) $record->pending_balance) }}{{ \App\Models\SystemSetting::formatMoney($record->opening_balance) }} {{ \App\Models\SystemSetting::formatMoney($openingDue) }} {{ \App\Models\SystemSetting::formatMoney($purchaseDue) }} {{ \App\Models\SystemSetting::formatMoney($totalPayable) }}{{ $record->is_active ? 'Active' : 'Inactive' }}
Edit @if(($contactType ?? '') === 'customer') Receive Payment @if($canViewContactMoney) Customer Statement @endif @if($canViewContactMoney) Customer Ledger @endif View Invoices @endif @if(($contactType ?? '') === 'supplier') @if($canViewContactMoney) Supplier Statement / Ledger @endif View Purchases @if($canViewContactMoney && $record->opening_balance_due > 0) @endif @endif
@csrf @method('DELETE')
No records found.
{{ $records->links('vendor.pagination.jevapos') }}
@if(($contactType ?? '') === 'supplier' && $canViewContactMoney) @endif