@extends('layouts.main') @section('page-title') {{ __('Invoices') }} @endsection @section('page-breadcrumb') {{ __('Invoices') }} @endsection @section('page-action')
@endsection @section('content')
@foreach ($statues as $key => $status) @php $invoices = App\Models\Invoice::where('workspace', getActiveWorkSpace()) ->where('status', $key) ->get(); $countstatus = $invoices->count(); $totalAmount = 0; foreach ($invoices as $invoice) { $totalAmount += $invoice->getDue(); } $total = $totalDueAmount != 0 ? number_format($totalAmount / $totalDueAmount, 4) : 0; @endphp

{{ $status }}

{{ currency_format_with_sym($totalAmount) }}
{{ __('Total Amount') }}
{{ $total * 100 }}{{ __('%') }}
{{ __('Total Percentage') }}
@endforeach
@endsection