{{__('Purchase')}}


{{__('Pos Date')}} :
{{company_date_formate($purchase->pos_date,$purchase->created_by, $purchase->workspace)}}

@if(!empty($vendor->billing_name))
{{__('Billed To')}} :
{{ !empty($vendor->billing_name) ? $vendor->billing_name : '' }}
{{ !empty($vendor->billing_address) ? $vendor->billing_address : '' }}
{{ !empty($vendor->billing_city) ? $vendor->billing_city . ' ,' : '' }} {{ !empty($vendor->billing_state) ? $vendor->billing_state . ' ,' : '' }} {{ !empty($vendor->billing_zip) ? $vendor->billing_zip : '' }}
{{ !empty($vendor->billing_country) ? $vendor->billing_country : '' }}
{{ !empty($vendor->billing_phone) ? $vendor->billing_phone : '' }}
@endif @if(company_setting('shipping_display',$purchase->created_by, $purchase->workspace)=='on')
{{__('Shipped To')}} :
{{ !empty($vendor->shipping_name) ? $vendor->shipping_name : '' }}
{{ !empty($vendor->shipping_address) ? $vendor->shipping_address : '' }}
{{ !empty($vendor->shipping_city) ? $vendor->shipping_city .' ,': '' }} {{ !empty($vendor->shipping_state) ? $vendor->shipping_state .' ,': '' }} {{ !empty($vendor->shipping_zip) ? $vendor->shipping_zip : '' }}
{{ !empty($vendor->shipping_country) ? $vendor->shipping_country : '' }}
{{ !empty($vendor->shipping_phone) ? $vendor->shipping_phone : '' }}
@endif
{!! DNS2D::getBarcodeHTML(route('purchase.link.copy',\Illuminate\Support\Facades\Crypt::encrypt($purchase->id)), "QRCODE",2,2) !!}
{{__('Status')}} :
@if($purchase->status == 0) {{ __(Modules\Account\Entities\Bill::$statues[$purchase->status]) }} @elseif($purchase->status == 1) {{ __(Modules\Account\Entities\Bill::$statues[$purchase->status]) }} @elseif($purchase->status == 2) {{ __(Modules\Account\Entities\Bill::$statues[$purchase->status]) }} @elseif($purchase->status == 3) {{ __(Modules\Account\Entities\Bill::$statues[$purchase->status]) }} @elseif($purchase->status == 4) {{ __(Modules\Account\Entities\Bill::$statues[$purchase->status]) }} @endif
{{__('Item Summary')}}
{{__('All items here cannot be deleted.')}}
@php $totalQuantity=0; $totalRate=0; $totalTaxPrice=0; $totalDiscount=0; $taxesData=[]; $TaxPrice_array = []; @endphp @foreach($iteams as $key =>$iteam) @if(!empty($iteam->tax)) @php $taxes=\Modules\Pos\Entities\Purchase::taxs($iteam->tax); $totalQuantity+=$iteam->quantity; $totalRate+=$iteam->price; $totalDiscount+=$iteam->discount; foreach($taxes as $taxe){ $taxDataPrice=\Modules\Pos\Entities\Purchase::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 @if(!empty($taxesData)) @foreach($taxesData as $taxName => $taxPrice) @endforeach @endif
# {{__('Item Type')}} {{__('Item')}} {{__('Quantity')}} {{__('Rate')}} {{__('Tax')}} {{__('Discount')}} {{__('Description')}} {{__('Price')}}
{{__('before tax & discount')}}
{{$key+1}} {{!empty($iteam->product_type) ? Str::ucfirst($iteam->product_type) : '--'}} {{!empty($iteam->product())?$iteam->product()->name:''}} {{$iteam->quantity}} {{currency_format_with_sym($iteam->price,$purchase->created_by, $purchase->workspace)}} @if(!empty($iteam->tax)) @php $totalTaxRate = 0; $data=0; @endphp @foreach($taxes as $tax) @php $taxPrice=\Modules\Pos\Entities\Purchase::taxRate($tax->rate,$iteam->price,$iteam->quantity); $totalTaxPrice+=$taxPrice; $data+=$taxPrice; @endphp @endforeach @php array_push($TaxPrice_array,$data); @endphp
{{$tax->name .' ('.$tax->rate .'%)'}} {{currency_format_with_sym($taxPrice,$purchase->created_by, $purchase->workspace)}}
@else - @endif
{{currency_format_with_sym($iteam->discount,$purchase->created_by, $purchase->workspace)}} {{!empty($iteam->description)?$iteam->description:'-'}} {{currency_format_with_sym(($iteam->price*$iteam->quantity),$purchase->created_by, $purchase->workspace)}}
{{__('Total')}} {{$totalQuantity}} {{currency_format_with_sym($totalRate,$purchase->created_by, $purchase->workspace)}} {{currency_format_with_sym($totalTaxPrice,$purchase->created_by, $purchase->workspace)}} {{currency_format_with_sym($totalDiscount,$purchase->created_by, $purchase->workspace)}}
{{__('Sub Total')}} {{currency_format_with_sym($purchase->getSubTotal(),$purchase->created_by, $purchase->workspace)}}
{{__('Discount')}} {{currency_format_with_sym($purchase->getTotalDiscount(),$purchase->created_by, $purchase->workspace)}}
{{$taxName}} {{ currency_format_with_sym($taxPrice,$purchase->created_by, $purchase->workspace) }}
{{__('Total')}} {{currency_format_with_sym($purchase->getTotal(),$purchase->created_by, $purchase->workspace)}}
{{__('Paid')}} {{currency_format_with_sym(($purchase->getTotal()-$purchase->getDue()),$purchase->created_by, $purchase->workspace)}}
{{__('Due')}} {{currency_format_with_sym($purchase->getDue(),$purchase->created_by, $purchase->workspace)}}