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

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

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

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

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

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

@endif

{{__('invoice')}}

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

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

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

{{__('Date')}} : {{ formatted_date($sale->saleDate ?? '') }}

{{__('Time')}} : {{ formatted_time($sale->saleDate ?? '') }}

{{__('Sales By')}} : {{ $sale->user->name }}

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

{{ $sale->meta['notes'] ?? ($sale->meta['note'] ?? '') }}

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

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

{{ __('Vat') }}:

{{ currency_format($sale->tax_amount, currency: business_currency()) }}

{{ __('Delivery charge') }}:

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

{{ __('Discount') }} @if ($sale->discount_type == 'percent') ({{ $sale->discount_percent }}%) @endif:

{{ currency_format($sale->discountAmount + $total_discount, currency: business_currency()) }}

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

{{ currency_format($subtotal + $sale->tax_amount - ($sale->discountAmount + $total_discount) + $sale->shipping_charge + $sale->rounding_amount, currency: business_currency()) }}

@php $total_return_amount = 0; @endphp @foreach ($sale_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->saleDetail->product->productName ?? '' }} {{ $detail->return_qty ?? 0 }} {{ currency_format($detail->return_amount ?? 0, currency: business_currency()) }}
{{ __('Payment Type') }}: {{ $sale->payment_type_id != null ? $sale->payment_type->name ?? '' : $sale->paymentType }}

{{ $sale->meta['notes'] ?? ($sale->meta['note'] ?? '') }}

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

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

{{ __('Payable') }}:

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

{{ __('Due') }}:

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

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

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

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

{{__('Vat')}} :

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

{{__('Discount')}} :

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

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

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

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

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

{{__('Due')}} :

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

@endif
@push('js') @endpush