{{ $contact->fullname }}
{{ trans('pdf.contact_info') }}
@if ($contact->email) @else @endif
{{ trans('pdf.full_name') }} {{ $contact->fullname }}
{{ trans('pdf.email') }}{{ $contact->email }}--------
{{ trans('pdf.phone') }} {{ is_array(json_decode($contact->phone, true)) ? implode(', ', json_decode($contact->phone, true)) : $contact->phone }}
{{ trans('pdf.invoice_info') }}
{{ trans('pdf.status') }} {{ trans('pdf.numbers') }}
{{ trans('pdf.invoice_unpaid') }} {{ $invoicesNotPaidTurnover }}
{{ trans('pdf.invoice_paid') }} {{ $invoicesPaidTurnover }}
{{ trans('pdf.invoice_pending') }} {{ $invoicesValidatedTurnover }}
{{ trans('pdf.invoice_cancelled') }} {{ $invoicesCancelledTurnover }}
@if (count($invoices) > 0 )
{{ trans('pdf.invoice_list') }}
@foreach ($invoices as $invoice) @endforeach
{{ trans('pdf.number') }} {{ trans('pdf.total_amount') }} {{ trans('pdf.date') }} {{ trans('pdf.status') }}
{{ $invoice?->invoice_number }} {{ $invoice?->total }} {{ $invoice?->invoice_date }} @if ($invoice?->invoice_status === 'VALIDATED') {{ trans('pdf.validated') }} @elseif ($invoice?->invoice_status === 'DRAFT') {{ trans('pdf.draft') }} @elseif ($invoice?->invoice_status === 'PAID') {{ trans('pdf.paid') }} @elseif ($invoice?->invoice_status === 'PARTIALLY_PAID') {{ trans('pdf.partially_paid') }} @elseif ($invoice?->invoice_status === 'CREDITNOTE') {{ trans('pdf.credit_note') }} @elseif ($invoice?->invoice_status === 'ARCHIVED') {{ trans('pdf.archived') }} @elseif ($invoice?->invoice_status === 'CANCELLED') {{ trans('pdf.cancelled') }} @endif
@else
{{ trans('pdf.invoice_list') }} (0)
@endif
@if (count($estimateStatusTurnover) > 0 )
{{ trans('pdf.estimate_info') }}
@foreach ($estimateStatusTurnover as $status) @endforeach @else
{{ trans('pdf.estimate_info') }} (0)
@endif
{{ trans('pdf.status') }} {{ trans('pdf.numbers') }} {{ trans('pdf.total_amount') }}
{{ trans('pdf.estimate_' . strtolower($status['name'])) }} {{ $status['count'] }} {{ number_format($status['amount']) }}
@if (count($estimates) > 0)
{{ trans('pdf.estimate_list') }}
@foreach ($estimates as $estimate) @endforeach
{{ trans('pdf.number') }} {{ trans('pdf.date') }} {{ trans('pdf.status') }} {{ trans('pdf.total_amount') }}
{{ $estimate?->estimate_number }} {{ $estimate?->estimate_date }} @if ($estimate?->status === 'APPROVED') {{ trans('pdf.validated') }} @elseif ($estimate?->status === 'DRAFT') {{ trans('pdf.draft') }} @elseif ($estimate?->status === 'PENDING') {{ trans('pdf.pending') }} @elseif ($estimate?->status === 'REJECTED') {{ trans('pdf.rejected') }} @elseif ($estimate?->status === 'CANCELLED') {{ trans('pdf.cancelled') }} @endif {{ number_format($estimate?->total) }}
@else
{{ trans('pdf.estimate_list') }} (0)
@endif
@if (count($opportunitiesTotalByStatus) > 0)
{{ trans('pdf.opportunity_info') }}
@foreach ($opportunitiesTotalByStatus as $status) @endforeach
{{ trans('pdf.status') }} {{ trans('pdf.numbers') }} {{ trans('pdf.expected_income') }}
{{ trans('pdf.opportunity_' . strtolower($status['name'])) }} {{ $status['count'] }} {{ number_format($status['amount']) }}
@else
{{ trans('pdf.opportunity_info') }} (0)
@endif
@if (count($opportunities) > 0)
{{ trans('pdf.opportunity_list') }}
@foreach ($opportunities as $opportunity) @endforeach
{{ trans('pdf.closing_date') }} {{ trans('pdf.opportunity_name') }} {{ trans('pdf.expected_income') }} {{ trans('pdf.opportunity_stage') }}
@if ($opportunity->closing_date) {{ $opportunity->closing_date }} @else ---- @endif {{ $opportunity->name }} {{ number_format($opportunity->expected_income) }} {{ $opportunity->opportunityState->name }}
@else
{{ trans('pdf.opportunity_list') }} (0)
@endif