|
{{ __('PURCHASE')}} |
@if(empty($purchase->vender_name)) {{ __('Name ') }}: {{ !empty($vendor->name) ? $vendor->name : '' }} @else {{ __('Name ') }}: {{ !empty($purchase->vender_name) ? $purchase->vender_name : '' }} @endif @if (!empty($vendor->billing_name) && !empty($vendor->billing_address) && !empty($vendor->billing_zip)) {{ __('Bill To')}}:
{{ !empty($vendor->billing_name) ? $vendor->billing_name : '' }} |
@if(empty($purchase->vender_name))
{{ __('Email ') }}: {{ !empty($vendor->email) ? $vendor->email : '' }} @endif @if($settings['purchase_shipping_display']=='on') @if (!empty($vendor->shipping_name) && !empty($vendor->shipping_address) && !empty($vendor->shipping_zip)) {{__('Ship To')}}:
{{ !empty($vendor->shipping_name) ? $vendor->shipping_name : '' }} |
{{__('Item Type')}} | {{__('Item')}} | {{__('Quantity')}} | {{__('Rate')}} | {{__('Discount')}} | {{__('Tax')}} (%) | {{__('Price')}}{{ __('After discount & tax')}} | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{!empty($item->product_type) ? Str::ucfirst($item->product_type) : '--' }} | {{$item->name}} | {{$item->quantity}} | {{currency_format_with_sym($item->price,$purchase->created_by,$purchase->workspace)}} | {{($item->discount!=0)?currency_format_with_sym($item->discount,$purchase->created_by,$purchase->workspace):'-'}} |
@if(!empty($item->itemTax))
@foreach($item->itemTax as $taxes)
{{$taxes['name']}} ({{$taxes['rate']}}) {{$taxes['price']}}
@endforeach
@else
- @endif |
@php
$subtotal = $item->price * $item->quantity;
$discount = $item->discount ?? 0;
$tax_total = 0;
if (!empty($item->itemTax)) {
foreach ($item->itemTax as $tax) {
$tax_amount = (float) preg_replace('/[^0-9.]/', '', $tax['price']);
$tax_total += $tax_amount;
}
}
$final_total = $subtotal - $discount + $tax_total;
@endphp
{{ currency_format_with_sym($final_total, $purchase->created_by, $purchase->workspace) }} | @if ($item->description != null)||||||||||||
{{$item->description}} | ||||||||||||||||||
- | - | - | - |
- - |
- | - | ||||||||||||
- | ||||||||||||||||||
{{__('Total')}} | {{$purchase->totalQuantity}} | {{currency_format_with_sym($purchase->totalRate,$purchase->created_by,$purchase->workspace)}} | {{currency_format_with_sym($purchase->totalDiscount,$purchase->created_by,$purchase->workspace)}} | {{currency_format_with_sym($purchase->totalTaxPrice,$purchase->created_by,$purchase->workspace) }} | {{currency_format_with_sym(($purchase->getSubTotal()-$purchase->getTotalDiscount()+$purchase->getTotalTax()),$purchase->created_by,$purchase->workspace)}} | |||||||||||||
|