@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) : '' !!}
Reff No. : {!! $sale_invoice->reff_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')
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)) : '') !!}
@php $appointmentDateTime = $sale_invoice->appointment_date_time; // Parse the appointment date and time into a Carbon instance $carbonAppointmentDateTime = \Carbon\Carbon::parse($appointmentDateTime); // Subtract 30 minutes $newDateTime = $carbonAppointmentDateTime->subMinutes(30); // Format the new datetime in 'h:i A' format $newFormattedDateTime = $newDateTime->format('h:i A'); @endphp
Reporting Time {!! $newFormattedDateTime !!}
Serial No. : {!! $sale_invoice->appointment_serial_no ?? '' !!}
Invoice No : {!! $sale_invoice->booking_no ?? '' !!}
Invoice Date : {!! $sale_invoice->booking_date_time ? formatedDate($sale_invoice->booking_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->main_invoice_no ?? ''; } $barcodeData = base64_encode($generatorPNG->getBarcode($mainInvoiceNo, $generatorPNG::TYPE_CODE_128)); @endphp
@foreach (accountLicenses($patient->id) as $value) @endforeach
Patient Details:
{!! $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 @php $address = generate_comma_separated_string([ 'city'=>$patientAddress->city->name?? '', 'state'=>$patientAddress->state->name?? '', 'country'=>$patientAddress->country->name?? '']); @endphp
Address: {!! $address !!}
Phone: {{ $patient->account_contact->phone_no??'' }}
{!! $value->name !!} : {!! $value->license_number !!}
@if($voucherType!='SALES') @if($doctorQualification) @endif @if($collectionAgent) @endif @if($referralLab) @endif
Doctor Details:
{!! $doctorTitle->name??'' !!} {{ $ref_doctor }}
{!! $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 !!}
{{--
{!! DNS2D::getBarcodeSVG($mainInvoiceNo, 'QRCODE') !!}
--}}
@endif @if( request()->segment(2) != 'prescription-print' )
{!! $voucherTitle ?? '' !!}
@endif