@if ($searched && isset($Invoices))
@php
$avt = App\Models\Avt::find(1);
$saleavt = $avt ? $avt->AVT : 0;
$totalprice = 0;
$totaldiscount = 0;
$totaltax = 0;
@endphp
| {{ __('home.Invoice_no') }} |
{{ __('home.sallerName') }} |
{{ __('home.clietName') }} |
{{ __('home.date') }} |
{{ __('home.branch') }} |
{{ $isAr ? 'الخصم' : 'Discount' }} |
{{ __('home.total') }} |
{{ __('home.operations') }} |
@foreach ($Invoices as $invoice)
@php
$net = $invoice->Price - $invoice->discount;
$tax = $net * $saleavt;
$totalprice += $net;
$totaldiscount += $invoice->discount;
$totaltax += $tax;
@endphp
| {{ $invoice->id }} |
{{ $invoice->user->name ?? '-' }} |
{{ $invoice->customer->name ?? '-' }} |
{{ $invoice->created_at }} |
{{ $invoice->branch->name ?? '-' }} |
{{ round($invoice->discount, 2) }} |
{{ round($net + $tax, 2) }} |
{{ $isAr ? 'عرض' : 'Show' }}
|
@endforeach
| {{ $isAr ? 'عدد الفواتير' : 'Invoices count' }} |
{{ count($Invoices) }} |
| {{ $isAr ? 'إجمالي الخصم' : 'Total discount' }} |
{{ round($totaldiscount, 2) }} |
| {{ $isAr ? 'الإجمالي بدون ضريبة' : 'Total before tax' }} |
{{ round($totalprice, 2) }} |
| {{ __('report.totaltax') }} |
{{ round($totaltax, 2) }} |
| {{ $isAr ? 'الإجمالي شامل الضريبة' : 'Grand total (incl. tax)' }} |
{{ round($totalprice + $totaltax, 2) }} |