@extends('layouts.master') @section('css') @endsection @section('title') {{ __('report.customerـpurchases') }} @endsection @section('page-header')
@endsection @section('content') @if ($errors->any()) @endif
{{ __('home.advanced_search_filters') ?? 'Advanced Search & Filters' }}

@csrf
@if(app()->getLocale() == 'ar')
@else
@endif
@if(app()->getLocale() == 'ar')
@else
@endif
@if (isset($Invoices))
{{ __('home.invoices_results') ?? 'Invoices Results' }}
@php $startat = $Invoices->first()->created_at ?? ''; $endat = $Invoices->last()->created_at ?? ''; $saleavt = $avt->AVT ?? 0; @endphp @foreach ($Invoices as $product) @php $pay = match($product->Pay) { 'Cash' => __('report.cash'), 'Shabka' => __('report.shabka'), 'Credit' => __('report.credit'), 'Bank_transfer' => __('home.Bank_transfer'), default => __('home.Partition of the amount'), }; $totalPrice = ($product->Price - $product->discount) + (($product->Price - $product->discount) * $saleavt); @endphp @endforeach
{{ __('home.Invoice_no') }} {{ __('home.sallerName') }} {{ __('home.clietName') }} {{ __('home.date') }} {{ __('home.branch') }} {{ __('home.total') }} {{ __('home.paymentmethod') }} {{ __('home.operations') }}
{{ $product->id }} {{ $product->user->name ?? '' }} {{ $product->customer->name ?? '' }} {{ $product->created_at }} {{ $product->branch->name ?? '' }} {{ round($totalPrice, 2) }} {{ $pay }} {{ __('home.show') }}

@if ($Invoices->count() >= 1 && isset($userid)) @endif
@endif
@endsection @section('js') @endsection