@if($voucherType=='PATHOLOGY_LAB_BILLING' || $voucherType=='PATHOLOGY' || $voucherType=='IPD_ADMISSION' || $voucherType=='SALES')
Invoice No : {!! $sale_invoice->main_invoice_no ?? '' !!}
Date : {!! $sale_invoice->invoice_date ? formatedDate($sale_invoice->invoice_date) : '' !!}
Batch No. : {!! $sale_invoice->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->reference !!}
@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 ?? $sale_invoice->main_invoice_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':'UH' !!} ID : {{ $patient->unique_register_no?$patient->unique_register_no:$patient->code }}
Gender/Age : {{ $patientContact->gender->name ?? '' }}{{ $age > 0 ? ', '.$age.' Years' : '' }}
{!! $value->name !!} : {!! $value->license_number !!}
Address : {{-- @php $address = generate_comma_separated_string(['address'=>$patientAddress->address_line1, 'city'=>$patientAddress->city->name, 'state'=>$patientAddress->state->name, 'country'=>$patientAddress->country->name]); @endphp --}} {!! $patientAddress->city->name??'' !!}
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 }}
Dr. Qualification : {!! $doctorQualification->qualifications??'' !!}
Collection Agent : {!! $collectionAgentTitle->name??'' !!} {{ $collectionAgent }}
Ref. Partner : {!! $referralLabTitle->name??'' !!} {{ $referralLab }}
Registered At :
Collected At :
@endif
{{--@if($voucherType=='IPD_ADMISSION') {!! DNS1D::getBarcodeHTML($sale_invoice->voucher_type_invoice_no, 'C93') !!} @else --}} {{--@endif --}}
{!! $mainInvoiceNo !!}
{{--
{!! DNS2D::getBarcodeSVG($mainInvoiceNo, 'QRCODE') !!}
--}}
@endif {{--
{!! $voucher_type->voucher_title ?? '' !!}
--}}