@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')
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->main_invoice_no ?? ''; } $barcodeData = ''; if(!empty($mainInvoiceNo)) { $barcodeData = base64_encode($generatorPNG->getBarcode($mainInvoiceNo, $generatorPNG::TYPE_CODE_128)); } @endphp
Patient Name : {!! !empty($patientTitle) ? $patientTitle->name:'' !!} {{ !empty($patientTitle) ? $patient->name : '' }}
{!! $patient->unique_register_no?'ABHA':'Patient' !!} ID : {{ $patient->unique_register_no?$patient->unique_register_no:$patient->code }}
Address : @php $address = $patientAddress->city->name; @endphp {!! $address !!}
Consultant : {!! $doctorTitle->name??'' !!} {{ $ref_doctor }}
Admission No : {!! isset($admission) && !empty($admission->ipd_admission_no) ? $admission->ipd_admission_no : (isset($sale_invoice->getIpdAdmission->ipd_admission_no) && $sale_invoice->getIpdAdmission->ipd_admission_no!=''?$sale_invoice->getIpdAdmission->ipd_admission_no:'') !!}
Admission Date : {{ \Carbon\Carbon::parse($sale_invoice->getIpdAdmission->admission_date_time ?? '')->format($sale_invoice->getCompany->date_format) }}
@if($voucherType!='SALES') {{-- --}} @if ($patientContact) @endif @foreach (accountLicenses($patient->id) as $value) @endforeach {{-- @if($doctorQualification) @endif --}} @if($collectionAgent) @endif @if($referralLab) @endif
Ref. Doctor : {!! $doctorTitle->name??'' !!} {{ $ref_doctor }}
Invoice Date : {!! formatedDate($sale_invoice->invoice_date) ??'' !!} {!! formatedTime($sale_invoice->invoice_date) ??'' !!}
Gender : {{ $patientContact->gender->name ?? '' }}
Age : @if ($age > 0) {{ $age }} Years @endif
{!! $value->name !!} : {!! $value->license_number !!}
Phone No : {!! $patientContact->phone_no ?? '' !!} @if ($patientContact->whatsapp_no) WhatsApp : {!! $patientContact->whatsapp_no !!} @endif
Qualification : {!! $doctorQualification->qualifications??'' !!}
Bed No : {!! $sale_invoice->bed_name ??'' !!}
TPA/Corporate : {!! $sale_invoice->account_name ??'' !!}
Discharge Date : @if(!empty($data->discharge_datetime)) {!! !empty($data->discharge_datetime) ? formatedDate($data->discharge_datetime) : '' !!} {!! !empty($data->discharge_datetime) ? formatedTime($data->discharge_datetime) : '' !!} @else {!! !empty($sale_invoice->discharge_date) ? formatedDate($sale_invoice->discharge_date) : '' !!} {!! !empty($sale_invoice->discharge_date) ? formatedTime($sale_invoice->discharge_date) : '' !!} @endif
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 !!}
@endif
@if(request()->segment(2) == 'discharge-statement') DISCHARGE CERTIFICATE
@else {!! $voucherTitle ?? '' !!} @if(empty($data->discharge_datetime)) (Provisional) @endif @endif