@extends('layouts.main') @section('page-title') {{__('POS Detail')}} @endsection @push('scripts') @endpush @push('css') @endpush @section('page-breadcrumb') {{__('POS Order')}}, {{\Modules\Pos\Entities\Pos::posNumberFormat($pos->pos_id) }} @endsection @section('page-action')
{{__('Download')}}
@endsection @section('content')

{{__('POS')}}

{{ \Modules\Pos\Entities\Pos::posNumberFormat($pos->pos_id) }}


@if(!empty($customer->billing_name)) {{__('Billed To')}} :
{{ !empty($customer->billing_name) ? $customer->billing_name : '' }}
{{ !empty($customer->billing_address) ? $customer->billing_address : '' }}
{{ !empty($customer->billing_city) ? $customer->billing_city . ' ,' : '' }} {{ !empty($customer->billing_state) ? $customer->billing_state . ' ,' : '' }} {{ !empty($customer->billing_zip) ? $customer->billing_zip : '' }}
{{ !empty($customer->billing_country) ? $customer->billing_country : '' }}
{{ !empty($customer->billing_phone) ? $customer->billing_phone : '' }}
{{__('Tax Number ')}} : {{!empty($customer->tax_number)?$customer->tax_number:''}}
@endif
@if($company_setting['pos_shipping_display']=='on') @if(!empty($customer->shipping_name)) {{__('Shipped To')}} :
{{ !empty($customer->shipping_name) ? $customer->shipping_name : '' }}
{{ !empty($customer->shipping_address) ? $customer->shipping_address : '' }}
{{ !empty($customer->shipping_city) ? $customer->shipping_city .' ,': '' }} {{ !empty($customer->shipping_state) ? $customer->shipping_state .' ,': '' }} {{ !empty($customer->shipping_zip) ? $customer->shipping_zip : '' }}
{{ !empty($customer->shipping_country) ? $customer->shipping_country : '' }}
{{ !empty($customer->shipping_phone) ? $customer->shipping_phone : '' }}
{{__('Tax Number ')}} : {{!empty($customer->tax_number)?$customer->tax_number:''}}
@endif @endif
{{__('Issue Date')}} : {{company_date_formate($pos->purchase_date)}}

@php $totalQuantity=0; $totalRate=0; $totalTaxPrice=0; $totalDiscount=0; $taxesData=[]; @endphp @foreach($iteams as $key =>$iteam) @if(!empty($iteam->tax)) @php $taxes=\Modules\Pos\Entities\Pos::tax($iteam->tax); $totalQuantity+=$iteam->quantity; $totalRate+=$iteam->price; $totalDiscount+=$iteam->discount; foreach($taxes as $taxe){ $taxDataPrice=\Modules\Pos\Entities\Pos::taxRate($taxe->rate,$iteam->price,$iteam->quantity); if (array_key_exists($taxe->name,$taxesData)) { $taxesData[$taxe->name] = $taxesData[$taxe->name]+$taxDataPrice; } else { $taxesData[$taxe->name] = $taxDataPrice; } } @endphp @endif @endforeach
# {{__('Items')}} {{__('Quantity')}} {{__('Price')}} {{__('Tax')}} {{__('Tax Amount')}} {{__('Total')}}
{{$key+1}} {{!empty($iteam->product())?$iteam->product()->name:''}} {{$iteam->quantity}} {{currency_format_with_sym($iteam->price)}} @if(!empty($iteam->tax)) @php $totalTaxRate = 0; $totalTaxPrice = 0; @endphp @foreach($taxes as $tax) @php $taxPrice=\Modules\Pos\Entities\Pos::taxRate($tax->rate,$iteam->price,$iteam->quantity); $totalTaxPrice+=$taxPrice; @endphp {{$tax->name .' ('.$tax->rate .'%)'}}
@endforeach
@else - @endif
{{currency_format_with_sym($totalTaxPrice)}} {{currency_format_with_sym(($iteam->price*$iteam->quantity+$totalTaxPrice))}}
{{__(' Sub Total')}} {{currency_format_with_sym($posPayment['amount'])}}
{{__('Discount')}} {{currency_format_with_sym($posPayment['discount'])}}
{{__('Total')}} {{currency_format_with_sym($posPayment['discount_amount'])}}
@endsection