@extends('layouts.master') @section('css') @section('title') تقرير مبيعات الموظف - Employee Sales Report @stop @endsection @section('page-header') @endsection @section('content')

تقرير مبيعات الموظف

Employee Sales Report


@if (count($errors) > 0) @endif
@if (isset($Invoices))
@php $totaldiscount = 0; $totalpriceall = 0; $total = 0; $count = 0; $startat = ''; $endat = ''; @endphp
@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 @endforeach
{{ __('home.Invoice_no') }} {{ __('home.sallerName') }} {{ __('home.clietName') }} {{ __('home.date') }} {{ __('home.branch') }} {{ __('home.total') }} {{ __('home.paymentmethod') }} {{ __('home.operations') }}
#{{ $product->id }} {{ optional($product->user)->name }} {{ optional($product->customer)->name }} {{ $product->created_at }} {{ optional($product->branch)->name }} {{ round($invoiceTotal, 2) }} {{ $pays }}   {{ __('home.show') }}
{{ __('home.totaldiscount') }} {{ number_format($totaldiscount, 2) }}
{{ __('report.totalpricewithoudtax') }} {{ number_format($totalpriceall, 2) }}
{{ __('report.totalallprice') }} {{ number_format($total, 2) }}
@endif
@endsection @section('js') @endsection