@extends('layouts.list-layout') @section('list-title')
{{ __('Invoices') }}
@endsection @section('list-add-button') @if(Helpers::has_permission(Auth::user()->id, 'add_invoice'))  {{ __('New Invoice') }} @endif @endsection @section('list-form-content')
{{ __('Total Amount') }}
@forelse($amounts['amounts'] as $amount) {{ isset($amount->totalInvoice) ? formatCurrencyAmount($amount->totalInvoice, isset($amount->currency->symbol) ? $amount->currency->symbol : '') : 0 }}
@empty {{ formatCurrencyAmount(0) }}
@endforelse
{{ __('Total Paid') }}
@forelse($amounts['amounts'] as $amount) {{ isset($amount->totalPaid) ? formatCurrencyAmount($amount->totalPaid, isset($amount->currency->symbol) ? $amount->currency->symbol : '') : 0 }}
@empty {{ formatCurrencyAmount(0) }}
@endforelse
{{ __('Total Due') }}
@forelse($amounts['amounts'] as $amount) {{ formatCurrencyAmount($amount->totalInvoice - $amount->totalPaid, isset($amount->currency->symbol) ? $amount->currency->symbol : '') }}
@empty {{ formatCurrencyAmount(0) }}
@endforelse
{{ __('Over Due') }}
@if(count($amounts['overDue']) > 0) @foreach($amounts['overDue'] as $index => $overDue) {{ isset($overDue) && !empty($overDue) ? formatCurrencyAmount($overDue['totalAmount'] - $overDue['totalPaid'], isset($overDue->currency->symbol) ? $overDue->currency->symbol : '') : formatCurrencyAmount(0) }}
@endforeach @foreach($allCurrency as $key => $value) {{ formatCurrencyAmount(0, $value) }}
@endforeach @else @if (!empty($allCurrency)) @foreach($allCurrency as $key => $value) {{ formatCurrencyAmount(0, $value) }}
@endforeach @else {{ formatCurrencyAmount(0) }}
@endif @endif
@endsection @section('list-js') @endsection