@extends('layouts.master') @section('title') {{ __('home.edit_previous_invoices') }} @stop @section('css') @endsection @section('page-header') @endsection @section('content')
فلاتر البحث السريع في الفواتير
{{-- نموذج الفلترة والبحث --}}
{{-- 1. رقم الفاتورة --}}
{{-- 2. العميل --}}
{{-- 3. تاريخ الفاتورة --}}
{{-- 4. أزرار البحث وإعادة الضبط --}}

{{-- جدول نتائج الفواتير --}} @if(isset($invoices) && $invoices->count() > 0)
@foreach($invoices as $product) @php $avt = App\Models\Avt::find(1); $saleavt = $avt->AVT ?? 0.15; $totalWithTax = ($product->Price - $product->discount) + (($product->Price - $product->discount) * $saleavt); @endphp {{-- 1. رقم الفاتورة --}} {{-- 2. البائع --}} {{-- 3. اسم العميل --}} {{-- 4. التاريخ --}} {{-- 5. الخياط --}} {{-- 6. الفرع --}} {{-- 7. الإجمالي شامل الضريبة --}} {{-- 8. طريقة الدفع --}} {{-- 9. زر الإجراء --}} @endforeach
{{ __('sales.th_invoice_id') }} {{ __('sales.th_seller') }} {{ __('sales.th_customer_name') }} {{ __('sales.th_date') }} {{ __('sales.th_tailor') }} {{ __('sales.th_branch') }} {{ __('sales.th_total_inc_tax') }} {{ __('sales.th_payment_method') }} {{ __('sales.th_actions') }}
#{{ $product->id }} {{ $product->user->name ?? '---' }} {{ $product->customer->name ?? '---' }} {{ date('Y-m-d', strtotime($product->created_at)) }} {{ $product->employee->name_ar ?? "لا يوجد" }} {{ $product->branch->name ?? '---' }} @if(round($totalWithTax, 2) == 0) {{ __('home.return') }} @else {{ number_format($totalWithTax, 2) }} ريال @endif @if ($product->Pay == 'Cash') {{ __('report.cash') }} @elseif ($product->Pay == 'Shabka') {{ __('report.shabka') }} @elseif ($product->Pay == "Credit") {{ __('report.credit') }} @elseif ($product->Pay == "Bank_transfer") {{ __('home.Bank_transfer') }} @else {{ __('home.Partition of the amount') }} @endif @if($product->Pay == "Partition") نقداً: {{ round($totalWithTax - $product->bankamount - $product->Bank_transfer, 2) }} | شبكة: {{ $product->bankamount }} @endif {{ __('sales.edit_measurements') }}
@elseif(request()->has('invoice_id') || request()->has('invoice_date') || request()->has('customer_id')) {{-- في حال تم البحث ولم تظهر نتائج --}}
{{ __('sales.no_invoices_found') }}
@else {{-- الإرشاد الأولي قبل بدء البحث --}}
ابحث عن الفواتير لتعديل المقاسات

{{ __('sales.use_search_hint') }}

@endif
@endsection