{{__('messages.Order Search')}}

  • {{__('messages.search')}}
    {{__('messages.currency')}} .defer currency_id @foreach(\App\Models\Currency::all() as $currency) @endforeach
    {{__('messages.Status')}} status .defer
    {{__('messages.Payment Status')}} .defer payment_status
    @if (!auth()->user()->can('show only my orders') || auth()->user()->hasRole('super-admin'))
    {{__('messages.Created by')}} .defer created_by_user_id @foreach(\App\Models\User::whereHas("orders")->orderBy("name")->get() as $user) @endforeach
    {{__('messages.last_follow_up_by')}} .defer last_follow_up_by @foreach(\App\Models\User::whereHas("owner_orders")->orderBy("name")->get() as $user_f) @endforeach
    @endif {{--
    {{__('messages.Branch')}} .defer branch_id @foreach(\App\Models\Branch::all() as $branch) @endforeach
    --}}
    {{__('messages.Account Type')}} .defer order_account_type
    {{__('messages.during a period of time')}}
    {{--
    {{__('messages.Created by')}}
    @foreach(\App\Models\User::whereHas('orders')->get() as $user)
    @endforeach
    --}}
  • {{__('messages.Search By Order Details')}}
    order_detail_status {{__('messages.Status')}} .defer
    Item Type order_detail_item_type {{-- .lazy --}}
    @switch($order_detail_item_type) @case('App\Models\Product')
    {{__('messages.Product')}} order_detail_item_id .defer @foreach(\App\Models\Product::has("order_details")->orderBy('name_en','asc')->get() as $product) @endforeach
    @break @case('App\Models\ProductOffer')
    {{__('messages.Offer')}} order_detail_item_id .defer @foreach(\App\Models\Offer::whereIn("id",\App\Models\ProductOffer::has("order_details")->pluck("offer_id"))->get() as $offer) @endforeach
    @break @case('App\Models\ClubMembership')
    {{__('messages.Club MemberShip')}} order_detail_item_id .defer @foreach(\App\Models\ClubMembership::has("order_details")->get() as $club) @endforeach
    @break @case('App\Models\PackageProduct')
    {{__('messages.Package')}} order_detail_item_id .defer @foreach(\App\Models\Package::whereIn("id",\App\Models\PackageProduct::has("order_details")->pluck("package_id"))->get() as $pack) @endforeach
    @break @case('App\Models\InstallmentPackageProduct')
    {{__('messages.Installment Package')}} order_detail_item_id .defer @foreach(\App\Models\InstallmentPackage::whereIn("id",\App\Models\InstallmentPackageProduct::has("order_details")->pluck("installment_package_id"))->get() as $inst_pack) @endforeach
    @break @endswitch {{--
    {{__('messages.Branch')}}
    @foreach(\App\Models\Branch::all() as $branch)
    @endforeach
    --}}
    {{__('messages.Search By Order Payment')}} {{--
    order_payment_payment_method_id {{__('messages.Payment Method')}} .defer @foreach(\App\Models\PaymentMethod::all() as $paymentMethod) @endforeach
    --}} @if($order_payment_payment_method_id == 2)
    order_payment_payment_machine_id {{__('messages.Payment Machine')}} .defer @foreach(\App\Models\PaymentMachine::all() as $paymentMachine) @endforeach
    @endif
    {{__('messages.Branch')}} .defer order_payment_branch_id @foreach(\App\Models\Branch::orderBy('id','asc')->get() as $branch) @endforeach
    {{__('messages.Payment Method')}}
    @foreach(\App\Models\PaymentMethod::all() as $paymentMethod)
    @endforeach
{{__('messages.Items Count')}} : {{$count_items}}
# {{__('messages.Order')}} {{__('messages.Receipt No.')}} {{__('messages.Created by')}} {{__('messages.Created At')}} {{__('messages.Customer')}} {{__('messages.last_follow_up_by')}} {{-- {{__('messages.Status')}} {{__('messages.Payment Status')}} --}} {{__('messages.Total Amount with Taxes')}} {{__('messages.Total Payment')}} {{__('messages.Payment Method')}} {{__('messages.Items Count')}} {{ __('messages.Actions') }} {{-- {{__('messages.Transfer operations')}} {{__('messages.Change operations')}} {{__('messages.Refunded operations')}} {{__('messages.transferred to wallet operations')}} --}} {{--{{__('messages.Created by')}} {{__('messages.Created at')}}--}} @forelse ($orders as $key =>$order) #{{$orders->firstItem() + $key}} {{__('messages.Order')}}{{$order->id}} {{__('messages.Receipt No.')}} @foreach ($order->order_payments as $op) @if ($op->receipt_serial_no) ({{$op->receipt_serial_no}})   @endif @endforeach {{__('messages.Created by')}}{{($order->created_by_user)?$order->created_by_user->name:'-'}} {{__('messages.Created At')}}{{($order->created_at)?$order->created_at:""}} {{__('messages.Customer')}} @if ($order->account_type=='App\Models\Customer') {{$order->account->name}} @else {{$order->account->name}} @endif {{__('messages.last_follow_up_by')}}{{$order->account->last_follow_up_by_user->name}} {{-- {{__('messages.Status')}}{{$order->status}} {{__('messages.Payment Status')}}{{$order->payment_status}} --}} {{__('messages.Total Amount with Taxes')}}{{number_format((float) $order->total_amount_with_taxes, 2)}} {{$order->currency->name}} {{__('messages.Total Payment')}} {{number_format((float) $order->order_payments->sum('amount'), 2)}} {{$order->currency->name}} @if ($order->order_items_count ==0) ({{__('messages.wallet')}}) @endif {{__('messages.Payment Method')}}{{ ($order->order_payments()->first())?$order->order_payments()->first()->payment_method->name:""}} {{__('messages.Items Count')}} {{$order->order_items_count }} {{__('messages.Actions')}}
@if( $order->order_details()->where('status','transfered')->first() ) {{__('messages.transfered')}} @endif @if( $order->order_details()->where('status','changed')->first()) {{__('messages.changed')}} @endif @if( $order->order_details()->where('status','refunded')->first() ) {{__('messages.refunded')}} @endif @if( $order->order_details()->where('status','transfered to wallet')->first() ) {{__('messages.transfered to wallet')}} @endif
{{-- {{__('messages.Transfer operations')}} @if( $order->order_details()->where('status','transfered')->first() ) {{__('messages.details')}} @else @endif {{__('messages.Change operations')}} @if( $order->order_details()->where('status','changed')->first()) {{__('messages.details')}} @else @endif {{__('messages.transferred to wallet operations')}} @if( $order->order_details()->where('status','refunded')->first() ) {{__('messages.details')}} @else @endif {{__('messages.transferred to wallet operations')}} @if( $order->order_details()->where('status','transfered to wallet')->first() ) {{__('messages.details')}} @else @endif --}} {{--{{__('messages.Created by')}}{{($order->created_by_user)?$order->created_by_user->name:"-"}} {{__('messages.Created at')}}{{$order->created_at}}--}}
@empty {{__('messages.Empty Result')}} @endforelse
{{$orders->links()}}