@extends('layouts.app') @section('title', $sale_invoice->booking_no . ' - '. ($sale_invoice->booking_date_time ? formatedDate($sale_invoice->booking_date_time) : '') . ' - ' . ($sale_invoice->getPatient->name ?? '')) @section('pages')
@include('layouts.partials.nav-menu')
Patient Details

@php $date_of_birth = $sale_invoice->getPatient->account_contact->date_of_birth ?? ''; $age = $date_of_birth != '' ? age($sale_invoice->getPatient->account_contact->date_of_birth) : 0; @endphp
Patient Name {!! $sale_invoice->getPatient->code ?? '' !!} - {!! $sale_invoice->getPatient->name ?? '' !!}
Sex/Age {!! $sale_invoice->getPatient->account_contact->gender->name ?? '' !!}/{!! $age !!} Years
Address {!! $sale_invoice->getPatient->first_account_address->address_line1 ?? '' !!}
State Name {!! $sale_invoice->getPatient->first_account_address->state->name ?? '' !!}
Doctor Details

@if(isset($sale_invoice->getDoctorAccount)) @endif
Doctor Name {{ ucfirst($sale_invoice->getDoctorAccount->name) }}
Address {{$sale_invoice->getDoctorAccount->first_account_address->address_line1 ?? ''}}
Email {{$sale_invoice->getDoctorAccount->account_contact->email ?? ''}}
Phone No {{$sale_invoice->getDoctorAccount->account_contact->phone_no ?? ''}}
Collection Agent Details

@if(isset($sale_invoice->getCollectionAgent)) @endif
Collection Agent Name {{ ucfirst($sale_invoice->getCollectionAgent->name) }}
Address {{$sale_invoice->getCollectionAgent->first_account_address->address_line1 ?? ''}}
Email {{$sale_invoice->getCollectionAgent->account_contact->email ?? ''}}
Phone No {{$sale_invoice->getCollectionAgent->account_contact->phone_no ?? ''}}
Refferal Lab Details

@if(isset($sale_invoice->getRefferalLab)) @endif
Refferal Laboratory {{ ucfirst($sale_invoice->getRefferalLab->name) }}
Address {{$sale_invoice->getRefferalLab->first_account_address->address_line1 ?? ''}}
Email {{$sale_invoice->getRefferalLab->account_contact->email ?? ''}}
Phone No {{$sale_invoice->getRefferalLab->account_contact->phone_no ?? ''}}
@if($voucher_type && $voucher_type->tax_applicable == '1') @endif @if($voucher_type && $voucher_type->tax_applicable == '1') @endif @php $total_gst_amount = 0; $IGST = $CGST = $SGST = 0; @endphp @foreach($sale_invoice->getOpdBookingDetails as $key => $value) @if($voucher_type && $voucher_type->tax_applicable == '1') @endif @php $gst = $value->getProduct->getTaxMaster->total_percentage ?? 0; $gst_amount = ($gst > 0 ? (($gst / 100) * $value->amount) : 00); $total_gst_amount +=$gst_amount @endphp @if($voucher_type && $voucher_type->tax_applicable == '1') @php if (isset($value->getProduct->getTaxMaster->getTaxMasterSub)) { foreach($value->getProduct->getTaxMaster->getTaxMasterSub as $tax) { if ($tax->name == 'IGST') { $IGST = $tax->percentage ?? 0; } else if ($tax->name == 'CGST') { $CGST = $tax->percentage ?? 0; } else if ($tax->name == 'SGST') { $SGST = $tax->percentage ?? 0; } } } @endphp @endif @endforeach
Sl.No ITEM NAME & DETAILS HSN/SACMRP QTY Dis(%) PRICEGST% IGST CGST SGST CESS BASICTOTAL
{!! $key + 1 !!} {!! $value->getProduct->name ?? '' !!}{!! $value->getProduct->hsncode ?? '' !!} {!! isset($value->getProduct->getProductPrice->mrp) ? convertDecimelPoint($value->getProduct->getProductPrice->mrp) : '' !!} {!! isset($value->main_qty) ? convertDecimelPoint($value->main_qty) : '1' !!} {!! isset($value->discount_amount) ? convertDecimelPoint($value->discount_amount) : '0' !!} ({!! $value->discount_percentage ?? '0' !!}) {!! convertDecimelPoint($value->product_price) !!}{!! $gst !!}% ({!! convertDecimelPoint($gst_amount) !!}){!! $IGST !!}% {!! $CGST !!}% {!! $SGST !!}% {!! convertDecimelPoint($value->tax_cess_amount) ?? '' !!} {!! convertDecimelPoint($value->amount) ?? '' !!} {!! convertDecimelPoint($value->amount + $gst_amount) ?? '' !!}
@if(auth()->user()->can('company-documents-edit')) @endif @if(auth()->user()->can('company-documents-delete')) @endif @php $i=1;@endphp @if(count($documents)>0) @foreach($documents as $key=> $list) @if(auth()->user()->can('document-management-edit')) @endif @if(auth()->user()->can('document-management-delete')) @endif @php $i++; @endphp @endforeach @else @endif
Sl No Document No Voucher Type Note Document Date Time StatusEditDelete
{{1 + $key}} {!! $list->document_no !!} {{ $list->voucher_type }} {{ \Str::limit($list->document_note, 80) }} @if($list->file_url != '') @endif {!! formatedDateTime($list->date_time) !!}
status=='1' ? 'checked' : ''}}>
No Data Found
{{--
--}}
@endsection @section('js') @endsection