@extends('layouts.adminLayout.admin_design') @section('content')

{{ $title }}

@if($orderInfo) @php $establishmentAddress = ($orderInfo['establishment_address'])?$orderInfo['establishment_address']:[]; @endphp
{{ __('lbl.from') }}
{{($establishmentAddress)?$establishmentAddress['contact_name']:'N/A'}}
@if($establishmentAddress['address_line_f']) {{$establishmentAddress['address_line_f']}}
@endif @if($establishmentAddress['address_line_s']) {{$establishmentAddress['address_line_s']}},
@endif @if($establishmentAddress['city']) {{$establishmentAddress['city']}}, @endif @if($establishmentAddress['state']) {{$establishmentAddress['state']}}, @endif @if($establishmentAddress['zip_postal_code']) {{$establishmentAddress['zip_postal_code']}}
@endif {{ __('lbl.phone') }}: {{$establishmentAddress['phone']}}
{{ __('lbl.email') }}: {{$establishmentAddress['email']}}
{{ __('lbl.app_order_id') }}: {{$orderInfo['app_order_id']}}
{{ __('lbl.employee') }}: {{($orderInfo['order_employee_info'])?$orderInfo['order_employee_info']['emp_name']:'-'}}
@if(Helper::widgetAccess('show_column_tax_amount')) @endif @if(Helper::widgetAccess('allow_order_edits')) @endif @php $backcolor = ''; $flag = ''; $total_grand_total=0;$total_product_price=0;$total_net_sales=0;$total_tax_amount=0;$total_discount_amount=0; @endphp @if(!empty($orderInfo['order_items'])) @foreach($orderInfo['order_items'] as $pro) @php $dRate = ($pro['discountType']==1 && $pro['discountRate']>0) ? '('.$pro['discountRate'].'%)' : ''; $flag='';$backcolor = ''; $discount_amount=0; $grand_total = ($pro['price']-$pro['discount_amount']+$pro['tax_amount']+$pro['crv_amount']); $price_amount = $pro['price']; $tax_amount = round($pro['tax_amount'],2); $tax_perc=0; if($pro['price']){ $tax_perc = round($pro['tax_amount']*100/$pro['price'],2); } $discount_amount = $pro['discount_amount']; $net_amount = ($pro['price']-$pro['discount_amount']); $backcolor='#fffccc'; @endphp @if($pro['returned']=='1') @php $backcolor='#ffdddd'; $flag = '(RETURNED)'; @endphp @else @php $total_grand_total = $total_grand_total + $grand_total; $total_product_price = $total_product_price + $price_amount; $total_tax_amount = $total_tax_amount + $tax_amount; $total_discount_amount = $total_discount_amount + $discount_amount; $total_net_sales = $total_net_sales + $net_amount; @endphp @endif @if(Helper::widgetAccess('show_column_tax_amount')) @endif @if(Helper::widgetAccess('allow_order_edits')) @endif @if(!empty($pro['attribute'])) @foreach($pro['attribute'] as $attr) @endforeach @endif @endforeach @endif @if(Helper::widgetAccess('show_column_tax_amount')) @endif
{{ __('lbl.product_name') }} {{ __('lbl.product_sku') }} {{ __('lbl.barcode') }} {{ __('lbl.product_price') }} {{ __('lbl.quantity') }} {{ __('lbl.net_sales')}}{{ __('lbl.tax') }}{{ __('lbl.crv_tax') }} {{ __('lbl.discount') }} {{ __('lbl.subtotal') }} {{ __('lbl.grand_total') }}{{ __('lbl.action') }}
{{ $pro['product_name'] }} {{$flag}} {{ $pro['product_sku'] }} {{ $pro['product_barcode'] }} {{storecurrency().number_format(floatval($pro['price'])/$pro['quantity'],2) }} {{ $pro['quantity'] }} {{storecurrency().number_format((floatval($pro['price'])/$pro['quantity'])*$pro['quantity'],2) }}{{storecurrency().$pro['tax_amount'] }} (%{{$tax_perc}}){{storecurrency().$pro['crv_amount'] }} {{storecurrency().$pro['discount_amount'] }} {{$dRate}} {{storecurrency().number_format(floatval($pro['price']),2) }} {{storecurrency().$grand_total }} @if($pro['returned']=='1') @else @endif
   - {{$attr['attributes_name']}} {{$attr['order_item_unique_id']}} {{storecurrency().number_format($attr['price'],2)}}
{{ __('lbl.item_grand_total') }} {{storecurrency().$total_net_sales}}{{storecurrency().$total_tax_amount}} {{storecurrency().number_format($total_discount_amount,2)}} {{storecurrency().$total_product_price}} {{storecurrency().$total_grand_total}}

{{ __('lbl.payments') }} : @if(Helper::widgetAccess('show_column_auth_code')) @endif @if(Helper::widgetAccess('allow_order_edits')) @endif @php $finaltotal = 0; @endphp @if(!empty($orderInfo['orderpayments'])) @foreach($orderInfo['orderpayments'] as $orderpayments) @php $last_four = substr($orderpayments['AccountNumber'],-4); @endphp @if(Helper::widgetAccess('show_column_auth_code')) @endif @if(Helper::widgetAccess('allow_order_edits')) @endif @php if($orderpayments['TransactionType'] == 'SALE'){ $finaltotal += (float)$orderpayments['AmountApproved']; }else{ $finaltotal -= (float)$orderpayments['AmountApproved']; } @endphp @endforeach @else @endif
{{__('lbl.pay_method')}} {{__('lbl.card_type')}} {{__('lbl.card_holder')}} {{__('lbl.last_4')}}{{__('lbl.auth_code')}}{{__('lbl.nmi_data')}} {{__('lbl.type')}} {{__('lbl.amount')}}{{__('lbl.action')}}
{{$orderpayments['PaymentType'] }} {{$orderpayments['CardType'] }} {{$orderpayments['Cardholder'] }} {{$last_four}}{{$orderpayments['AuthorizationCode'] }}{{$orderpayments['Token']}} {{$orderpayments['TransactionType']}}
{{storecurrency().number_format((float)$orderpayments['AmountApproved'],2) }}
@if($orderpayments['TransactionType'] == 'SALE') @endif
{{ __('lbl.total') }} {{storecurrency().number_format($finaltotal,2) }}
{{ __('lbl.no_record_found') }} @if(Helper::widgetAccess('allow_order_edits')) @endif
@if(!empty($orderInfo['order_note']))

{{ $orderInfo['order_note'] }}

@endif
@if(Helper::widgetAccess('show_column_is_order_printed')) @endif @if(Helper::widgetAccess('show_column_tax_amount')) @endif @if(Helper::widgetAccess('show_column_service_charge')) @endif
{{ __('lbl.is_printed') }}: {{ $orderInfo['is_order_printed']=='true' ? 'Yes' : 'No' }}
{{ __('lbl.gross_total') }}: @if($orderInfo['order_sub_total'] == $total_product_price) {{storecurrency().number_format(($orderInfo['order_sub_total']),2) }} @else
{{storecurrency().number_format(($orderInfo['order_sub_total']),2) }}
@endif
{{ __('lbl.discount') }}: @if($orderInfo['order_sub_total'] == $total_product_price) {{storecurrency().number_format($orderInfo['order_discount_total'],2) }} @else
{{storecurrency().number_format(($orderInfo['order_discount_total']),2) }}
@endif
{{ __('lbl.net_totals') }}: {{storecurrency().number_format(($orderInfo['order_sub_total']-$orderInfo['order_discount_total']),2) }}
{{ __('lbl.tax') }}: @if($orderInfo['order_sub_total'] == $total_product_price) {{storecurrency().number_format($orderInfo['tax_amount'],2) }} @else
{{storecurrency().number_format(($orderInfo['tax_amount']),2) }}
@endif
{{ __('lbl.crv_tax') }}: {{storecurrency().number_format($orderInfo['crv_amount'],2) }}
{{ __('lbl.surcharge') }}: {{storecurrency().number_format($orderInfo['surcharge'],2) }}
{{ __('lbl.service_charge') }}: {{storecurrency().number_format($orderInfo['service_charge'],2) }}
{{ __('lbl.tip_amount') }}: @if($orderInfo['order_total'] == $finaltotal) {{storecurrency().number_format($orderInfo['tip_amount'],2) }} @else
{{storecurrency().number_format($orderInfo['tip_amount'],2) }}
@endif
{{ __('lbl.total') }}: @if($orderInfo['order_total'] == $finaltotal) {{storecurrency().number_format($orderInfo['order_total'],2) }} @else
{{storecurrency().number_format($orderInfo['order_total'],2) }}
@endif
{{ __('lbl.customerpaid') }}: {{storecurrency().number_format($orderInfo['order_total']+$orderInfo['customer_change'],2) }}
{{ __('lbl.customerchange') }}: {{storecurrency().number_format($orderInfo['customer_change'],2) }}
@endif
{{ Form::hidden('orderrowupdate',route('updateorderrecord'),['id'=>'orderrowupdate'])}} {{ Form::hidden('deletepayment',route('updatepaymentrecord'),['id'=>'deletepayment'])}} @endsection @section('pagescript') {!! Helper::datatablelib('orders/list.js') !!} @stop