{{ $purchase->business->companyName ?? 'Pos Pro' }}

{{__('Address')}} : {{ $purchase->business->address ?? '' }}

{{__('Mobile')}} : {{ $purchase->business->phoneNumber ?? '' }}

{{__('Email')}} : {{ auth()->user()->email ?? '' }}

@if (!empty($purchase->business->vat_name))

{{ $purchase->business->vat_name }} : {{ $purchase->business->vat_no ?? '' }}

@endif

{{__('invoice')}}

{{__('Invoice')}} : {{ $purchase->invoiceNumber ?? '' }}

{{__('Name')}} : {{ $purchase->party->name ?? '' }}

{{__('Mobile')}} : {{ $purchase->party->phone ?? '' }}

{{__('Date')}} : {{ formatted_date($purchase->purchaseDate ?? '') }}

{{__('Time')}} : {{ formatted_time($purchase->purchaseDate ?? '') }}

{{__('Purchase By')}} : {{ $purchase->user->name }}

@if (!$purchase_returns->isEmpty()) @php $subtotal = 0; @endphp @foreach ($purchase->details as $detail) @php $productTotal = ($detail->productPurchasePrice ?? 0) * ($detail->quantities ?? 0); $subtotal += $productTotal; @endphp @endforeach
{{__('SL')}}. {{__('Product')}} {{__('QTY')}} {{__('U.Price')}} {{__('Amount')}}
{{ $loop->iteration }} {{ $detail->product->productName ?? '' }} {{ $detail->quantities ?? '' }} {{ currency_format($detail->productPurchasePrice ?? 0, currency: business_currency()) }} {{ currency_format($productTotal, currency: business_currency()) }}
{{__('Payment Type')}} : {{ $purchase->payment_type_id != null ? $purchase->payment_type->name ?? '' : $purchase->paymentType }}

{{__('Sub-Total')}} :

{{ currency_format($subtotal, currency: business_currency()) }}

{{__('Vat')}} :

{{ currency_format($purchase->vat_amount, currency: business_currency()) }}

{{__('Discount')}} :

{{ currency_format($purchase->discountAmount, currency: business_currency()) }}

{{__('Shipping Charge')}} :

{{ currency_format($purchase->shipping_charge, currency: business_currency()) }}

{{__('Net Payable')}} :

{{ currency_format($subtotal + $purchase->vat_amount - ($purchase->discountAmount + $total_discount) + $purchase->shipping_charge, currency: business_currency()) }}

{{__('Due')}} :

{{ currency_format($purchase->dueAmount, currency: business_currency()) }}

@php $total_return_amount = 0; @endphp @foreach ($purchase_returns as $key => $return) @foreach ($return->details as $detail) @php $total_return_amount += $detail->return_amount ?? 0; @endphp @endforeach @endforeach
{{ __('Date') }} {{ __('Return Product') }} {{ __('QTY') }} {{ __('Amount') }}
{{ formatted_date($return->return_date) }} {{ $detail->purchaseDetail->product->productName ?? '' }} {{ $detail->return_qty ?? 0 }} {{ currency_format($detail->return_amount ?? 0, currency: business_currency()) }}
{{ __('Payment Type') }}: {{ $purchase->payment_type_id != null ? $purchase->payment_type->name ?? '' : $purchase->paymentType }}

{{ __('Total Return') }}:

{{ currency_format($total_return_amount, currency: business_currency()) }}

{{ __('Payable') }}:

{{ currency_format($purchase->totalAmount, currency: business_currency()) }}

{{ __('Due') }}:

{{ currency_format($purchase->dueAmount, currency: business_currency()) }}

@else @php $subtotal = 0; @endphp @foreach ($purchase->details as $detail) @php $productTotal = ($detail->productPurchasePrice ?? 0) * ($detail->quantities ?? 0); $subtotal += $productTotal; @endphp @endforeach
{{__('SL')}}. {{__('Product')}} {{__('QTY')}} {{__('U.Price')}} {{__('Amount')}}
{{ $loop->iteration }} {{ $detail->product->productName ?? '' }} {{ $detail->quantities ?? '' }} {{ currency_format($detail->productPurchasePrice ?? 0, currency: business_currency()) }} {{ currency_format($productTotal, currency: business_currency()) }}
{{__('Payment Type')}} : {{ $purchase->payment_type_id != null ? $purchase->payment_type->name ?? '' : $purchase->paymentType }}

{{__('Sub-Total')}} :

{{ currency_format($subtotal, currency: business_currency()) }}

{{__('Vat')}} :

{{ currency_format($purchase->vat_amount, currency: business_currency()) }}

{{__('Discount')}} :

{{ currency_format($purchase->discountAmount, currency: business_currency()) }}

{{__('Shipping Charge')}} :

{{ currency_format($purchase->shipping_charge, currency: business_currency()) }}

{{__('Net Payable')}} :

{{ currency_format($subtotal + $purchase->vat_amount - ($purchase->discountAmount + $total_discount) + $purchase->shipping_charge, currency: business_currency()) }}

{{__('Due')}} :

{{ currency_format($purchase->dueAmount, currency: business_currency()) }}

@endif
@push('js') @endpush