@if($voucherType=='PATHOLOGY_LAB_BILLING' || $voucherType=='PATHOLOGY' || $voucherType=='IPD_ADMISSION' || $voucherType=='SALES')
Invoice No : {!! $sale_invoice->voucher_type_invoice_no ?? '' !!}
Date : {!! $sale_invoice->invoice_date ? formatedDate($sale_invoice->invoice_date) : '' !!}
Reff No. : {!! $sale_invoice->getSaleInvoiceBatch->invoice_batch_no ?? '' !!}
@elseif($voucherType=='CONTRA' || $voucherType=='JOURNAL')
Voucher No : {!! $sale_invoice->voucher_no ?? '' !!}
Date : {!! ($sale_invoice->transaction_date ? formatedDate($sale_invoice->transaction_date) : '') !!}
Reff No. : {!! $sale_invoice->getSaleInvoiceBatch->invoice_batch_no !!}
@elseif($voucherType=='OPD_BOOKING')
Invoice No : {!! $sale_invoice->booking_no ?? '' !!}
Date : {!! $sale_invoice->booking_date_time ? formatedDate($sale_invoice->booking_date_time) : '' !!}
Serial No. : {!! $sale_invoice->appointment_serial_no ?? '' !!}
Appointment Date : {!! ($sale_invoice->appointment_date_time ? formatedDate($sale_invoice->appointment_date_time) : '') !!}
Time : {!! ($sale_invoice->appointment_date_time ? date('h:i A',strtotime($sale_invoice->appointment_date_time)) : '') !!}
Ref. : {!! 'Walk In' !!}
@endif @if($voucherType=='PATHOLOGY_LAB_BILLING' || $voucherType=='PATHOLOGY' || $voucherType=='IPD_ADMISSION' || $voucherType=='SALES' || $voucherType=='OPD_BOOKING') @php $patient = $sale_invoice->getPatient; $patientContact = $patient->account_contact ?? null; $patientTitle = $patient->account_title??null; $patientAddress = $patient->first_account_address ?? null; $dateOfBirth = $patientContact->date_of_birth ?? ''; $age = $dateOfBirth != '' ? age($dateOfBirth) : 0; $generatorPNG = new Picqer\Barcode\BarcodeGeneratorPNG(); if($voucherType=='OPD_BOOKING') { $ref_doctor = $sale_invoice->getDoctorAccount ? ucfirst(@$sale_invoice->getDoctorAccount->name) : 'Self'; $doctorTitle = $sale_invoice->getDoctorAccount->account_title??null; $doctorQualification = $sale_invoice->getDoctorAccount->account_contact??null; $generatorPNG = new Picqer\Barcode\BarcodeGeneratorPNG(); $mainInvoiceNo = $sale_invoice->booking_no ?? ''; $collectionAgent = $sale_invoice->getCollectionAgent? ucfirst(@$sale_invoice->getCollectionAgent->name):''; $collectionAgentTitle = $sale_invoice->getCollectionAgent->account_title??null; $referralLab = $sale_invoice->getRefferalLab?ucfirst(@$sale_invoice->getRefferalLab->name):''; $referralLabTitle = $sale_invoice->getRefferalLab->account_title??null; } else { $ref_doctor = $sale_invoice->getDoctor ? ucfirst(@$sale_invoice->getDoctor->name) : 'Self'; $doctorTitle = $sale_invoice->getDoctor->account_title??null; $doctorQualification = $sale_invoice->getDoctor->account_contact??null; $collectionAgent = $sale_invoice->getCollectionAgent? ucfirst(@$sale_invoice->getCollectionAgent->name):''; $collectionAgentTitle = $sale_invoice->getCollectionAgent->account_title??null; $referralLab = $sale_invoice->getRefferalLab?ucfirst(@$sale_invoice->getRefferalLab->name):''; $referralLabTitle = $sale_invoice->getRefferalLab->account_title??null; $mainInvoiceNo = $sale_invoice->voucher_type_invoice_no ?? ''; } $barcodeData = base64_encode($generatorPNG->getBarcode($mainInvoiceNo, $generatorPNG::TYPE_CODE_128)); @endphp
@if ($patientContact) @endif @foreach (accountLicenses($patient->id) as $value) @endforeach
Name : {!! $patientTitle?$patientTitle->name:'' !!} {{ $patient->name }}
{!! $patient->unique_register_no?'ABHA':'Patient' !!} ID : {{ $patient->unique_register_no?$patient->unique_register_no:$patient->code }}
Gender/Age : {{ $patientContact->gender->name ?? '' }} @if ($age > 0) , {{ $age }} Years @endif
{!! $value->name !!} : {!! $value->license_number !!}
Address : @php $address = isset($patientAddress->city) && isset($patientAddress->city->name)?$patientAddress->city->name:''; @endphp {!! $address !!}
Phone No : {!! $patientContact->phone_no ?? '' !!} @if ($patientContact->whatsapp_no) WhatsApp : {!! $patientContact->whatsapp_no !!} @endif
@if($voucherType!='SALES') @if($doctorQualification) @endif @if($collectionAgent) @endif @if($referralLab) @endif
Ref. Doctor : {!! $doctorTitle->name??'' !!} {{ $ref_doctor }}
Qualification : {!! $doctorQualification->qualifications??'' !!}
Collection Agent : {!! $collectionAgentTitle->name??'' !!} {{ $collectionAgent }}
Ref. Partner : {!! $referralLabTitle->name??'' !!} {{ $referralLab }}
@endif
@if($voucherType=='IPD_ADMISSION') {!! DNS1D::getBarcodeHTML($sale_invoice->main_invoice_no, 'C93') !!} @else @endif
{!! $mainInvoiceNo !!}
@if(request()->segment(1) != 'sale-invoice')
{!! DNS2D::getBarcodeSVG($mainInvoiceNo, 'QRCODE') !!}
@endif
@endif
{!! $voucherTitle ?? '' !!}