@if($company->logo)
@endif
{{ $company->name }}
{{ $company->tel }}
{{ $company->address }}
|
|
FACTURE Nº {{ $data->no() }}
|
| Désignation |
Quantité |
Prix Unitaire |
Prix Total |
@foreach($data->sale->commands as $command)
| {{ $command->product->name }} |
{{ $command->qte }} |
{{ number_format($command->product->selling_price, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
{{ number_format($command->qte * $command->product->selling_price, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
@endforeach
@if($company->tva)
| Total HT |
|
{{ number_format($data->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
| Montant TVA |
|
{{ number_format($data->tva_amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
| Total TTC |
|
{{ number_format($data->total, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
@else
| Total Général |
|
{{ number_format($data->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
@endif
@php
$paidSum = $data->payments()->sum('amount');
$discount = $data->discount ?? 0;
$totalDue = max(0, ($data->total ?? $data->amount) - $discount);
$remaining = max(0, $totalDue - $paidSum);
@endphp
| Total à payer |
|
{{ number_format($totalDue, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
({{ convertCurrencyToWords($totalDue) }} {{ $company->currency }})
|
@php
$paymentDate = ($data->payments && $data->payments->count() > 0) ? ' (' . $data->payments->first()->payment_date->translatedFormat('d/m/Y') . ')' : '';
@endphp
|
@if($remaining > 0)
Facture partiellement payée{{ $paymentDate }}
@else
Facture payée{{ $paymentDate }}
@endif
|
| Montant payé |
|
{{ number_format($paidSum, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
| Reste à payer |
|
{{ number_format($remaining, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |