@extends('layouts.invoices') @section('content')
Filter Invoices
Clear
Invoice List
@foreach($invoices as $invoice) @php $workersData = is_array($invoice->workers_data) ? $invoice->workers_data : json_decode($invoice->workers_data, true); $workerCount = is_array($workersData) ? count($workersData) : 0; @endphp
Invoice #
{{ $invoice->invoice_number }}
Date
{{ $invoice->invoice_date->format('Y-m-d') }}
e_Agency
{{ $invoice->client_name }}
Workers
{{ $workerCount }}
Stamping
{{ number_format($invoice->stamping_fee_total, 2) }}
Arrival
{{ number_format($invoice->arrival_fee_total, 2) }}
Total
{{ number_format($invoice->total_amount, 2) }}
Status
{{ ucfirst($invoice->status) }}
@if($invoice->status != 'paid')
@csrf
@endif
@endforeach

No invoices found matching your criteria.

{{ $invoices->links() }}
Payment Vouchers
@if($vouchers->isEmpty())
No vouchers found

Create your first payment voucher using the button above

@else
@foreach($vouchers as $voucher) @endforeach
Voucher # Sub-Agent Type Workers Amount Status Created Actions
{{ $voucher->voucher_number }}
{{ substr($voucher->subAgent->name, 0, 1) }}
{{ $voucher->subAgent->name }}
{{ $voucher->subAgent->email }}
{{ ucfirst($voucher->voucher_type) }} @php $workersData = $voucher->workers_data ? (is_array($voucher->workers_data) ? $voucher->workers_data : json_decode($voucher->workers_data, true) ) : []; $workerCount = is_array($workersData) ? count($workersData) : 0; @endphp {{ $workerCount }} {{ Str::plural('Worker', $workerCount) }}
{{ number_format($voucher->total_amount, 2) }}
{{ $voucher->currency }}
{{ ucfirst($voucher->status) }}
{{ $voucher->created_at->format('M d, Y') }}
{{ $voucher->created_at->format('h:i A') }}
@if($voucher->status === 'pending') @endif
Showing {{ $vouchers->firstItem() }} to {{ $vouchers->lastItem() }} of {{ $vouchers->total() }} entries
{{ $vouchers->links() }}
@endif
@include('invoices.partials.monthly-expenses-tab')
Office Expenses

Office expenses content will go here.

@include('invoices.partials.subagents-modal') @endsection