@extends('admin.layout.master') @section('content')

Order Details - #{{ $order->orderid }}

Print Invoice Print Packing Slip @if($order->locked == 'Y') @else Lock Order @endif
@foreach (['danger', 'warning', 'success', 'info'] as $msg) @if(Session::has('alert-' . $msg))

{{ Session::get('alert-' . $msg) }} ×

@endif @endforeach
{{--
--}} {{--

Order Details

--}} {{--

Order Details Print

--}}
@if(empty(request()->isSuccess))

Order Status

@if(!empty($lastordermodify))
Last modified on {{ date('n/d/Y', strtotime($lastordermodify->created_at)) }} at {{ date('g:i A', strtotime($lastordermodify->created_at)) }} by {{ $lastordermodify->adminuser->name }}
@endif
@endif

Order Summary

ORDER DATE: {{ date('n/d/Y g:i A', strtotime($order->orderdate)) }}
ORDER #:{{ $order->orderid }}
PAYMENT METHOD : @if(!empty($order->paymentlog->pay_details)) @if($order->paymentlog->pay_paymentmethodid == '13') {{ 'Purchase order # '.$order->paymentlog->pay_details }} @else {{ !empty($order->paymentlog->pay_details) ? $order->paymentlog->pay_details : "Credit Card" }} @endif @else Paypal @endif
TOTAL${{ number_format((float)($order->paymentamount), 2, '.', '') }}
@if(empty(request()->isSuccess)) {{--
TRACKING # @if(!empty($order->trackingnumber)) @foreach ($order->trackingnumber as $ot) {{ $ot }}
@endforeach @else - @endif
--}} @endif
{{--
SHIPPING METHOD NAME: {{ !empty($order->shippingmethodname) ? $order->shippingmethodname :"" }}
--}}
@if(empty(request()->isSuccess)) @php $fraudinsightdetail = !empty($order->fraudinsightdetail) ? $order->fraudinsightdetail->score : 0; if($fraudinsightdetail > 50){ $backgroudclass = 'bg-danger'; }else{ $backgroudclass = 'bg-info'; } @endphp

FRAUD SCORE

{{ !empty($order->fraudinsightdetail) ? $order->fraudinsightdetail->score : 0 }} % Chance of risk
@if(!empty($order->fraudinsightdetail->ipaddress)) @else @endif @if(!empty($order->fraudinsightdetail->ishighriskemail)) @else @endif @if(!empty($order->fraudinsightdetail->ispostalincityshippingaddress)) @else @endif
Anonymous IP addressYesNo
High risk emailYesNo
Shipping zip/postal matches cityYesNo
@if(!empty($order->fraudinsightdetail->ispostalincitybillingaddress)) @else @endif @if(!empty($order->fraudinsightdetail->ishighriskip)) @else @endif
Billing zip/postal matches cityYesNo
Is high risk countryYesNo
{{-- View Details --}}
@endif

Ship to     @if($order->locked != 'Y') Edit @endif

{{ $order->shipfirstname }} {{ $order->shiplastname }}

{{ $order->shipaddress1 }}

@if(!empty($order->shipaddress2))

{{ $order->shipaddress2 }}

@endif

{{ $order->shipcity }}, {{ $order->shipstate }} {{ $order->shippostalcode }}

{{ $order->shipcountry }}

{{ !empty($order->shipphonenumber) ? $order->shipphonenumber : $order->billingphonenumber }}

Bill to     @if($order->locked != 'Y') Edit @endif

{{ $order->billingfirstname }} {{ $order->billinglastname }}

{{ $order->billingaddress1 }}

@if(!empty($order->billingaddress2))

{{ $order->billingaddress2 }}

@endif

{{ $order->billingcity }}, {{ $order->billingstate }} {{ $order->billingpostalcode }}

{{ $order->billingcountry }}

{{ $order->billingphonenumber }}

{{ $order->coustomer->emailaddress }}
@if(empty(request()->isSuccess))

Payment Log

@if(!empty($order->paymentlogall)) @foreach ($order->paymentlogall as $pay)
Payment Date {{ !empty($pay) ? date('n/d/Y', strtotime($pay->pay_authdate)) : "" }}
Payment Type @if(!empty($pay->pay_result)) {{ $pay->pay_result }} @endif
Paid Via @if(!empty($pay->pay_details)) @if($pay->pay_paymentmethodid == '13') {{ 'Purchase order # '.$pay->pay_details }} @else {{ !empty($pay->pay_details) ? $pay->pay_details : "Credit Card" }} @endif @else Paypal @endif
Payment Amount${{ !empty($pay) ? $pay->pay_amount : ""}} | Refund
TransID{{ !empty($pay) ? $pay->pay_transid : ""}}
@endforeach @endif @php $itemprice2 = 0; foreach ($order->orderdetail as $orderdetail){ $itemprice2 += $orderdetail->totalprice; } $subtotal = $itemprice2; $totalDue = (($subtotal-$order->coupon_discount) + $order->totalshippingcost + $order->shippingsurcharges + $order->salestax1) - $order->paymentamount; @endphp @if ((number_format((float)($totalDue), 2, '.', '')) > 0)
Total Due
${{ number_format((float)($totalDue), 2, '.', '') }}   Capture
@endif
@endif

Order Tracking

Tracking

SELECTED SHIPPING METHOD

{{ $order->shippingmethodname }}  

@if($order->locked != 'Y') Edit @endif
@csrf
locked == 'Y') disabled @endif>
locked == 'Y') disabled @endif>
locked == 'Y') disabled @endif>
@foreach ($trackingnumbers as $t) @endforeach
Ship Date Tracking # Gateway Shipping Method Cost Action
{{ date('n/d/Y',strtotime($t->shipdate)) }} {{ $t->trackingnumber }} {{ $t->gateway }} {{ $t->shippingmehthodname }} ${{ $t->shipment_cost }}
Products     @if($order->locked != 'Y') Edit Add @endif
Product Code
Name/Options
Qty
Price
@foreach ($order->orderdetail as $orderdetail)
{{ $orderdetail->productcode }}

{{ (!empty($orderdetail->clientmap->pin->Name))?$orderdetail->clientmap->pin->Name:$orderdetail->productcode." Part" }}

{{--

{{ (!empty($orderdetail->productnote) ? $orderdetail->productnote : "") }}

--}} {{--

ProductCode: {{ $orderdetail->productcode }}

--}} {{--
Standard Return Policy
--}}
{{ $orderdetail->quantity }}
${{ $orderdetail->totalprice }}
@endforeach
@php $subtotal = $itemprice; @endphp
Subtotal
${{ $subtotal }}
@if(!empty($order->coupon_discount))
Discount ({{ $order->coupon_code }})
- ${{ number_format((float)$order->coupon_discount, 2, '.', '') }}
@else
@endif
Shipping @if(!empty($order->shippingmethodname)) ({{ $order->shippingmethodname }} @if(!empty($order->shippingsurcharges))inc. surcharges of ${{ number_format((float)$order->shippingsurcharges, 2, '.', '') }}@endif) @endif
${{ number_format((float)($order->totalshippingcost), 2, '.', '') }}
@if(!empty($order->shippingsurcharges)) {{--
Shipping Surcharges
${{ number_format((float)$order->shippingsurcharges, 2, '.', '') }}
--}} @endif
Estimated Tax ({{ round($order->salestaxrate1 *100,2).'%' }})
${{ number_format((float)($order->salestax1), 2, '.', '') }}
Total Authorized
${{ number_format((float)($order->paymentamount), 2, '.', '') }}
Total Received
${{ number_format((float)($order->total_payment_received), 2, '.', '') }}
@php $totalDue = (($subtotal-$order->coupon_discount) + $order->totalshippingcost + $order->shippingsurcharges + $order->salestax1) - $order->paymentamount; @endphp @if (number_format((float)($totalDue), 2, '.', '') > 0)
Total Due
${{ number_format((float)($totalDue), 2, '.', '') }}
@else
Total Due
${{ number_format((float)($totalDue), 2, '.', '') }}
@endif
@if(empty(request()->isSuccess))

Notes

@if(!$ordernotes->isEmpty()) @foreach ($ordernotes as $note)
{{ date('n/d/Y g:i A',strtotime($note->created_at)) }} / {{ $note->username }}

{{ $note->ordernotes }}

@endforeach @endif

Order CMT

{{--

Order Notes History

--}} @endif
@endsection