<div class="row border border-dark border-bottom-1 text-uppercase mx-0 font-12 mt-2" style="border-top: 1px solid #565656;border-bottom: 1px solid #565656;">
    <div class="col-4">
        <b>Invoice No : {!! $invoice->main_invoice_no ?? '' !!}</b>
    </div>
    <div class="col-4 text-center">
        <b>Date :
            {!! $invoice->invoice_date ? formatedDate($invoice->invoice_date) : '' !!}</b>
    </div>
    <div class="col-4 text-center">
        <b style="margin-left: -22px !important;">Reff No. : {!! $invoice->reff_no ?? '' !!}</b>
    </div>
</div>
@php
$patient = $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();


    $ref_doctor = $invoice->getDoctor ? ucfirst(@$invoice->getDoctor->name) : 'Self';
    $doctorTitle = $invoice->getDoctor->account_title??null;
    $doctorQualification = $invoice->getDoctor->account_contact??null;

    $collectionAgent = $invoice->getCollectionAgent? ucfirst(@$invoice->getCollectionAgent->name):'';
    $collectionAgentTitle = $invoice->getCollectionAgent->account_title??null;

    $referralLab = $invoice->getRefferalLab?ucfirst(@$invoice->getRefferalLab->name):'';
    $referralLabTitle = $invoice->getRefferalLab->account_title??null;
    $mainInvoiceNo = $invoice->main_invoice_no ?? '';

$barcodeData = base64_encode($generatorPNG->getBarcode($mainInvoiceNo, $generatorPNG::TYPE_CODE_128));
@endphp



<div class="row mb-1">
    <div class="col-12 text-center">
        <span class="text-bold my-auto font-14">{!! $voucherTitle ?? '' !!}
        </span>
    </div>
</div>
