@extends('admin.layouts.master') @section('title') Aramian Brother`s Jewelry @endsection @section('content') @include('admin.layouts.topbar') @include('admin.layouts.sidebar') @php use App\Helpers\Helpers; @endphp {{--
--}} {{-- --}}
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if($errors) @foreach ($errors->all() as $error)
{{ $error }}
@endforeach @endif

{{$checkout->full_name}}

Detail

@csrf
{{$checkout->created_at}}
{{$checkout->full_name}}
{{$checkout->address}}, {{$checkout->country->name}}, {{$checkout->state->name}}, {{$checkout->city}}
{{$checkout->zip_code}}
{{$checkout->phone}}
{{$checkout->email}}
{{$checkout->notes}}
{{--
--}}
@php $subTotal = 0; $discountPrice = 0; @endphp @foreach ($checkoutProduct as $cart) @php if($cart->product->discount_price > 0) $price=$cart->product->discount_price * $cart->products_count; else{ $price=$cart->product->price * $cart->products_count; } @endphp @php $cartTotal=$price * $cart->products_count; @endphp {{-- --}} @php $subTotal+=$price * $cart->products_count; $discountPrice+=$cart->product->price * $cart->products_count; @endphp @endforeach
Image Product Price Size Quantity Total
{{$cart->product->title}} {{ Helpers::getUserNumberFormat()->format($price) }} {{$cart->size->name}} {{$cart->products_count}} {{ Helpers::getUserNumberFormat()->format($cartTotal) }}In Stock

Paiement Totals

Subtotal

{{ Helpers::getUserNumberFormat()->format($subTotal) }}

Shipping

$0

Tax

@php if($subTotal > 0){ $vat = $subTotal * 10.25 /100; }else{ $vat = 0; } @endphp

{{ Helpers::getUserNumberFormat()->format($vat) }}

{{-- Calculate shipping --}} @php $discountSubTotal = $discountPrice+$vat; $total = $subTotal+$vat; // dd($discountTotal); @endphp @if ($total < $discountSubTotal) @php $discountTotal = $discountSubTotal - $discountPrice + $vat; $total = $subTotal+$vat; // dd($discountTotal); @endphp

Discount

{{ Helpers::getUserNumberFormat()->format($discountTotal)}}

@endif

Total

{{ Helpers::getUserNumberFormat()->format($total)}}