@extends('layouts.horizontal', ['title' => 'Invoice', 'topbarTitle' => 'View Invoice', 'nonav' => true]) @section('css') @endsection @section('content')
{!! $invoice[0]->business_address !!}
Phone: {{ $invoice[0]->business_phone }}
{{ $invoice[0]->customer_name }}
{{ $invoice[0]->customer_cell }}
@if($checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number) @if($invoice[0]->invoice_status == 'valid') {{ $checkquery->invoice_status }} @else {{ $checkquery->invoice_status }} @endif
Recovery

Ref: #{{ $checkquery->reference_invoice_number }}

Invoice: #{{ $checkquery->invoice_number }}

Visit: #{{ $checkquery->visit_id }}
ID: {{ $checkquery->id_invoice }}
Date: {{ $checkquery->invoice_date_formatted }}
Time: {{ $checkquery->invoice_time }}
Payment: {{ $checkquery->payment_mode }}
@if($checkquery->instrument_number != '' && $checkquery->instrument_number != null)
Instrument#: {{ $checkquery->instrument_number }}
@endif
Agent: {{ $checkquery->created_by }}
Type: {{ $checkquery->invoice_type == 'service' ? 'Service' : 'Retail' }}
@else @if($invoice[0]->invoice_status == 'valid') {{ $invoice[0]->invoice_status }} @else {{ $invoice[0]->invoice_status }} @endif

Invoice: #{{ $invoice[0]->invoice_number }}

Visit: #{{ $invoice[0]->visit_id }}
ID: {{ $invoice[0]->id_invoice }}
Date: {{ $invoice[0]->invoice_date_formatted }}
Time: {{ $invoice[0]->invoice_time }}
Payment: {{ $invoice[0]->payment_mode }}
@if($invoice[0]->instrument_number != '' && $invoice[0]->instrument_number != null)
Instrument#: {{ $invoice[0]->instrument_number }}
@endif
Agent: {{ $invoice[0]->created_by }}
Type: {{ $invoice[0]->invoice_type == 'service' ? 'Service' : 'Retail' }}
@endif
@if($invoice[0]->invoice_type=='sale') @elseif($invoice[0]->invoice_type=='service') @endif @if($invoice[0]->invoice_type=='sale' && ($checkquery->reference_invoice_number == '' || null == $checkquery->reference_invoice_number)) @endif @php $counter = 1; $total_discounted_price=0; @endphp @foreach($invoice as $item) @if($invoice[0]->invoice_type=='sale') @elseif($invoice[0]->invoice_type=='service') @endif @if($invoice[0]->invoice_type=='sale') @else @endif @php $total_discounted_price = $total_discounted_price + (float)$item->ddiscounted_price; @endphp @if($invoice[0]->invoice_type=='sale' && ($checkquery->reference_invoice_number == '' || null == $checkquery->reference_invoice_number)) @endif @php $counter++; @endphp @endforeach
# Item Unit Qty.Item Discription Discount Total
{{ $counter }}{{ $item->brand_name }} {{ $item->product_name }} {{ number_format((float)$item->price + ((float)$item->dservice_addition), 2, '.', '') }} {{ $item->invoice_qty }}{{ $item->dservice_type }} {{ $item->dservice_name }} {{ number_format((float)$item->dservice_discount, 2, '.', '') }}{{ number_format((float)$item->ddiscounted_price, 2, '.', '') }}{{ number_format((float)$item->ddiscounted_price + (float)$item->dservice_addition, 2, '.', '') }}
@if($invoice[0]->invoice_type == 'sale') @elseif($invoice[0]->invoice_type == 'service') @endif @if($invoice[0]->invoice_type == 'service' && $invoice[0]->idiscount != null && $invoice[0]->idiscount != 0) @endif @if($invoice[0]->invoice_type == 'service' && $invoice[0]->other_charges != null && $invoice[0]->other_charges != 0) @endif @if($invoice[0]->tax_total != null && (float)$invoice[0]->tax_total > 0) @if($invoice[0]->invoice_type == 'service') @endif @endif @if($invoice[0]->round_off != null && $invoice[0]->round_off != 0) @endif @if($invoice[0]->icc_charge != null && $invoice[0]->icc_charge != 0) @endif @if($invoice[0]->cctip != null && $invoice[0]->cctip != 0) @endif @if($invoice[0]->advance_amount != null && $invoice[0]->advance_amount > 0) @endif @if($invoice[0]->paid_voucher != null && $invoice[0]->paid_voucher > 0) @endif @if($invoice[0]->paid_loyalty != null && $invoice[0]->paid_loyalty > 0) @endif @if($invoice[0]->paid_retained != null && $invoice[0]->paid_retained > 0) @endif @if($invoice[0]->return_amount != null && $invoice[0]->return_amount > 0) @endif @if($invoice[0]->balance != null && $invoice[0]->balance > 0) @endif @if($checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number) @if($checkquery->cc_charge != null && $checkquery->cc_charge > 0) @endif @if($checkquery->rounded_adjustment != null && $checkquery->rounded_adjustment > 0) @endif @endif
Value before Tax {{ $total_discounted_price != null ? config('constants.CURRENCY') . ' ' . number_format($total_discounted_price, 2) : config('constants.CURRENCY') . ' 0.00' }}SubTotal {{ $invoice[0]->sub_total != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->sub_total, 2) : config('constants.CURRENCY') . ' 0.00' }}
Discount {{ $invoice[0]->idiscount != null ? config('constants.CURRENCY') . ' -' . number_format($invoice[0]->idiscount, 2) : '0.00' }}
Other Charges {{ $invoice[0]->other_charges != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->other_charges, 2) : '0.00' }}
Value Exclusive of Tax {{ $invoice[0]->gross_wo_tax != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->gross_wo_tax, 2) : '0.00' }}
Amount of Sales Tax {{ $invoice[0]->tax_total != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->tax_total, 2) : '0.00' }}
Value Inclusive of Tax {{ $invoice[0]->gross_amount != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->gross_amount, 2) : '0.00' }}
Round Off {{ $invoice[0]->round_off != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->round_off, 2) : '0.00' }}
Card Fee {{ $invoice[0]->icc_charge != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->icc_charge, 2) : '0.00' }}
Tip Charged on Card {{ $invoice[0]->cctip != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->cctip, 2) : '0.00' }}
Advance Payment (Paid) {{ $invoice[0]->advance_amount != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->advance_amount, 2) : '0.00' }}
Total Payable {{ $invoice[0]->total_payable != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->total_payable, 2) : '0.00' }}
{{ $checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number ? 'Recovered' : 'Paid ' }} ({{ $invoice[0]->payment_mode }}) {{ $invoice[0]->paid_amount != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->paid_amount, 2) : '0.00' }}
{{ $checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number ? 'Recovered' : 'Used Voucher' }} {{ $invoice[0]->paid_voucher != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->paid_voucher, 2) : '0.00' }}
{{ $checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number ? 'Recovered' : 'Used Loyalty' }} {{ $invoice[0]->paid_loyalty != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->paid_loyalty, 2) : '0.00' }}
{{ $checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number ? 'Recovered' : 'Used Retained ' }} {{ $invoice[0]->paid_retained != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->paid_retained, 2) : '0.00' }}
Returned {{ $invoice[0]->return_amount != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->return_amount, 2) : '0.00' }}
{{ $checkquery->reference_invoice_number != '' && null != $checkquery->reference_invoice_number ? 'Recoverable' : 'Balance' }} {{ $invoice[0]->balance != null ? config('constants.CURRENCY') . ' ' . number_format($invoice[0]->balance, 2) : '0.00' }}
CC Fee {{ $checkquery->cc_charge != null ? config('constants.CURRENCY') . ' ' . number_format($checkquery->cc_charge, 2) : '0.00' }}
Rounded Adjustment {{ $checkquery->rounded_adjustment != null ? config('constants.CURRENCY') . ' ' . number_format($checkquery->rounded_adjustment, 2) : '0.00' }}
Paid Amount {{ $checkquery->paid_amount != null ? config('constants.CURRENCY') . ' ' . number_format($checkquery->paid_amount, 2) : '0.00' }}
Remaining {{ $checkquery->balance != null ? config('constants.CURRENCY') . ' ' . number_format($checkquery->balance, 2) : '0.00' }}

THANK YOU FOR YOUR VISIT! It has been our pleasure to serve you, and we hope we see you again soon.

@if($business->invoice_terms == 'Yes')

Terms : {!! $business->payment_terms !!}

@endif @if($invoice[0]->imsfiscal_invoice_number != null && $invoice[0]->imsfiscal_invoice_number != '')
@if($business->imsfiscal == 'No')

PRA

@php $path = 'https://e.pra.punjab.gov.pk/IMSFiscalReport/SearchPOSInvoice_Report.aspx?PRAInvNo='.$invoice[0]->imsfiscal_invoice_number; @endphp

{!! QrCode::size(150)->generate($path) !!}

@elseif($business->srb_fiscal_service == 'Yes')

SRB

@php $path = 'https://pos.srb.gos.pk/InvoiceVerification/InvoiceStatus.jsp?invoiceVerification='.$invoice[0]->imsfiscal_invoice_number; @endphp

{!! QrCode::size(150)->generate($path) !!}

@endif @if($business->imsfiscal == 'Yes')

PRA Invoice Number:

{{ $invoice[0]->imsfiscal_invoice_number }} @elseif($business->srb_fiscal_service == 'Yes')

SRB Invoice Number:

{{ $invoice[0]->imsfiscal_invoice_number }} @endif
@endif @if($invoice[0]->receipt_url != null && $invoice[0]->receipt_url != '' ) @endif
@endsection @section('script') @endsection