@extends('layouts.master') @section('css') @endsection @section('title') {{ __('report.employeeـsales') }} @endsection @section('page-header') @endsection @section('content') @if ($errors->any()) @endif @if (session()->has('notfountreturnproduct')) @endif
{{ csrf_field() }}
@if (isset($Invoices))
@php $userId = 0; $count = 0; $totalprice = 0; $avt = App\Models\Avt::find(1); $saleavt = $avt ? $avt->AVT : 0; $totaladdedvalue = 0; $totaldiscount = 0; $startat = ''; $endat = ''; @endphp
@foreach ($Invoices as $product) @php $totaladdedvalue += ($product->Price - $product->discount) * $saleavt; $totalprice += ($product->Price - $product->discount); $totaldiscount += $product->discount; if ($count == 0) { $userId = $product->user_id; $startat = $product->created_at; } $endat = $product->created_at; $count++; // تحديد طريقة الدفع $pay = match($product->Pay) { 'Cash' => __('report.cash'), 'Shabka' => __('report.shabka'), 'Credit' => __('report.credit'), 'Bank_transfer' => __('home.Bank_transfer'), default => __('home.Partition of the amount'), }; @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(($product->Price - $product->discount) + (($product->Price - $product->discount) * $saleavt), 2) }} {{ $pay }} {{ __('home.show') }}
# البند المبلغ
1 {{ __('home.totaldiscount') }} {{ $totaldiscount }}
2 {{ __('report.totalpricewithoudtax') }} {{ $totalprice }}
3 {{ __('report.totaltax') }} {{ round($totaladdedvalue, 2) }}
4 {{ __('report.totalallprice') }} {{ round($totaladdedvalue + $totalprice, 2) }}
@endif
@endsection @section('js') @endsection