@if (isset($Invoices))
@php
$totaldiscount = 0;
$totalpriceall = 0;
$total = 0;
$count = 0;
$startat = '';
$endat = '';
@endphp
| {{ __('home.Invoice_no') }} |
{{ __('home.sallerName') }} |
{{ __('home.clietName') }} |
{{ __('home.date') }} |
{{ __('home.branch') }} |
{{ __('home.total') }} |
{{ __('home.paymentmethod') }} |
{{ __('home.operations') }} |
@foreach ($Invoices as $product)
@php
$totaldiscount += $product->discount;
$totalpriceall += ($product->cashamount + $product->bankamount + $product->Bank_transfer);
if ($count == 0) {
$startat = $product->created_at;
}
$endat = $product->created_at;
$count++;
$invoiceTotal = ($product->cashamount + $product->bankamount + $product->Bank_transfer + $product->creaditamount);
$total += $invoiceTotal;
$pays = match($product->Pay) {
'Cash' => __('report.cash'),
'Shabka' => __('report.shabka'),
'Credit' => __('report.credit'),
'Bank_transfer' => __('home.Bank_transfer'),
default => __('home.Partition of the amount')
};
@endphp
| #{{ $product->id }} |
{{ optional($product->user)->name }} |
{{ optional($product->customer)->name }} |
{{ $product->created_at }} |
{{ optional($product->branch)->name }} |
{{ round($invoiceTotal, 2) }} |
{{ $pays }} |
{{ __('home.show') }}
|
@endforeach
| {{ __('home.totaldiscount') }} |
{{ number_format($totaldiscount, 2) }} |
| {{ __('report.totalpricewithoudtax') }} |
{{ number_format($totalpriceall, 2) }} |
| {{ __('report.totalallprice') }} |
{{ number_format($total, 2) }} |