Invoice No : {!! $sale_return_invoice->voucher_type_invoice_no ?? '' !!}
Date : {!! $sale_return_invoice->invoice_date ? formatedDate($sale_return_invoice->invoice_date) : '' !!}
Reff Invoice No. : {!! $sale_return_invoice->reference_invoice_no ?? '' !!}
@php $patient = $sale_return_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 = $sale_return_invoice->getDoctor ? ucfirst(@$sale_return_invoice->getDoctor->name) : 'Self'; $doctorTitle = $sale_return_invoice->getDoctor->account_title??null; $doctorQualification = $sale_return_invoice->getDoctor->account_contact??null; $collectionAgent = $sale_return_invoice->getCollectionAgent? ucfirst(@$sale_return_invoice->getCollectionAgent->name):''; $collectionAgentTitle = $sale_return_invoice->getCollectionAgent->account_title??null; $referralLab = $sale_return_invoice->getRefferalLab?ucfirst(@$sale_return_invoice->getRefferalLab->name):''; $referralLabTitle = $sale_return_invoice->getRefferalLab->account_title??null; $mainInvoiceNo = $sale_return_invoice->voucher_type_invoice_no ?? ''; $barcodeData = base64_encode($generatorPNG->getBarcode($mainInvoiceNo, $generatorPNG::TYPE_CODE_128)); @endphp
Customer Details:
{!! $patientTitle?$patientTitle->name:'' !!} {{ $patient->name }}
@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??'' }}
{!! $mainInvoiceNo !!}
{!! $voucherTitle ?? '' !!}