@extends('Reports.template') @php $reportTitle = 'Doctor Wise - Sales Report'; @endphp @section('title') {{ $reportTitle }} @endsection @section('ExternalCss') @parent @endsection @section('Content') @if ($reportType != 'PMS') @php if ($billType === 'P') { $billTypeTitle = 'Cash'; } elseif ($billType === 'C') { $billTypeTitle = 'Credit'; } elseif ($billType === 'B') { $billTypeTitle = 'Both'; } if ($trnStatus === 'P') { $trnStatusMessage = 'Partial'; } elseif ($trnStatus === 'T') { $trnStatusMessage = 'Cancelled'; } elseif ($trnStatus === 'C') { $trnStatusMessage = 'Completed'; } else { $trnStatusMessage = 'ALL'; } @endphp @if(!is_null($rateCard)) @endif @if($doctorwiseorpatient == "P") @else @endif @php $patOrCustName = 0; $strike = 'noStrike'; $oldDoctorID = ""; $oldPatOrCustName = ""; $invoiceTotal = 0; $roundOffTotal = 0; $netAmtTotal = 0; $patInvoiceTotal = 0; $patRoundTotal = 0; $patNetAmtTotal = 0; @endphp @foreach ($productTransactionData as $key => $productTransaction) @php $strike = 'noStrike'; if ($productTransaction->patient_name != '') { $patORCustID = $productTransaction->patient_id; $patOrCustName = $productTransaction->patient_name; } else { $patORCustID = '*' . $productTransaction->ph_cust_id; $patOrCustName = $productTransaction->ph_cust_name; } $doctorID = $productTransaction->doctor_id; @endphp @if($oldPatOrCustName != "" && $patOrCustName != $oldPatOrCustName) @php $patInvoiceTotal = 0; $patRoundTotal = 0; $patNetAmtTotal = 0; @endphp @endif @if($doctorID != $oldDoctorID && $doctorwiseorpatient == "D") @if($oldDoctorID) @php $invoiceTotal = 0; $roundOffTotal = 0; $netAmtTotal = 0; $patInvoiceTotal = 0; $patRoundTotal = 0; $patNetAmtTotal = 0; $oldPatOrCustName = ""; @endphp @endif @endif @if ($productTransaction->ph_trn_status == 'T') @php $strike = 'strike'; @endphp @endif @if ($productTransaction->ph_trn_type == 'I' || $productTransaction->ph_trn_type == 'DC') @php $phInvoiceAmt = $productTransaction->ph_invoice_amt; $phRoundOff = $productTransaction->ph_round_off; $phTotal = $productTransaction->ph_total; @endphp @else @php $phInvoiceAmt = -1 * $productTransaction->ph_invoice_amt; $phRoundOff = -1 * $productTransaction->ph_round_off; $phTotal = -1 * $productTransaction->ph_total; @endphp @endif @php $paymentMode = ''; @endphp @if ($productTransaction->is_credit_bill == 'N') @php $paymentMode = $productTransaction->paymentMode; @endphp @endif @if($doctorwiseorpatient == "P") @else @endif @php $oldDoctorID = $productTransaction->doctor_id; $oldPatOrCustName = $patOrCustName; $invoiceTotal += $phInvoiceAmt; $roundOffTotal += $phRoundOff; $netAmtTotal += $phTotal; $patInvoiceTotal += $phInvoiceAmt; $patRoundTotal += $phRoundOff; $patNetAmtTotal += $phTotal; @endphp @endforeach @if(($patInvoiceTotal != 0 || $patRoundTotal != 0 || $patNetAmtTotal != 0)) @endif @if(($invoiceTotal != 0 || $roundOffTotal != 0 || $netAmtTotal != 0) && $doctorwiseorpatient == "D") @endif @php $currentTime = \Carbon\Carbon::now(); @endphp @endif
@if ($businessEntityMasterData[0]->logo != null) Pharmacy Logo @endif
{{ $businessEntityMasterData[0]->name }}
{{ $businessEntityMasterData[0]->add1 . ' ' . $businessEntityMasterData[0]->add2 . ' ' . $businessEntityMasterData[0]->city . ' : ' . $businessEntityMasterData[0]->pincode }}
{{ 'Phone : ' . $businessEntityMasterData[0]->tel1 }}
{{ $reportTitle . ' ' }} Store : {{ $storeName }} Period : {{ \Helper::getDisplayDate($fromDate) }} TO {{ \Helper::getDisplayDate($toDate) }}
Patient Category : @php $cat=""; foreach ($rateCard as $item) $cat.= $item->rate_card .'-'. $item->rate_type .', '; @endphp {{ rtrim($cat,', ') }}
UH ID / Cust ID   Patient / Customer Name Patient Category OP ID IP IDDoctor Bill No Bill No Bill Date Invoice R.Off Net Amount Created By
Patient Total {{ \Helper::customAmountFormat($patInvoiceTotal) }} {{ \Helper::customAmountFormat($patRoundTotal) }} {{ \Helper::customAmountFormat($patNetAmtTotal) }}
Doctor Total {{ \Helper::customAmountFormat($invoiceTotal) }} {{ \Helper::customAmountFormat($roundOffTotal) }} {{ \Helper::customAmountFormat($netAmtTotal) }}
{{ $productTransaction->doctor_name }}
{{ $patORCustID }}   {{ $patOrCustName }} {{ $productTransaction->rate_card.' - '.$productTransaction->rate_type }} {{ $productTransaction->opd_reg_id }} {{ \Helper::zeroValueToDash($productTransaction->ipd_reg_id) }} {{ $productTransaction->doctor_name }} @if ($productTransaction->is_credit_bill == 'Y') @endif {{ $productTransaction->ph_trn_type . "/" . $productTransaction->trn_fyear . "/" . $productTransaction->ph_trn_id }}   @if ($productTransaction->is_credit_bill == 'Y') @endif {{ $productTransaction->ph_trn_type . "/" . $productTransaction->trn_fyear . "/" . $productTransaction->ph_trn_id }}   {{ \Helper::getDisplayDate($productTransaction->trn_date) }} {{ \Helper::customAmountFormat($phInvoiceAmt) }} {{ \Helper::customAmountFormat($phRoundOff) }} {{ \Helper::customAmountFormat($phTotal) }} {{ $productTransaction->ph_created_by }}
Patient Total {{ \Helper::customAmountFormat($patInvoiceTotal) }} {{ \Helper::customAmountFormat($patRoundTotal) }} {{ \Helper::customAmountFormat($patNetAmtTotal) }}
Doctor Total {{ \Helper::customAmountFormat($invoiceTotal) }} {{ \Helper::customAmountFormat($roundOffTotal) }} {{ \Helper::customAmountFormat($netAmtTotal) }}
{{ Config::get('constants.asterisk.WALK_CUST') }}, ✱{{ 'Credit Bill' }} {{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }}
Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection