@extends('Reports.template') @section('title') @if ($rateType == 'W') @php $reportTitle = 'Patient Wise Gross Profit & Sales Margin Details - With GST'; @endphp @else @php $reportTitle = 'Patient Wise Gross Profit & Sales Margin Details - Without GST'; @endphp @endif {{ __($reportTitle) }} @endsection @section('ExternalCss') @parent @endsection @section('Content')
|
@if ($businessEntityMasterData[0]->logo != null)
|
{{ $businessEntityMasterData[0]->name }}
{{ $businessEntityMasterData[0]->add1 . ' ' . $businessEntityMasterData[0]->add2 . ' ' . $businessEntityMasterData[0]->city . ' : ' . $businessEntityMasterData[0]->pincode }}
{{ 'Phone : ' . $businessEntityMasterData[0]->tel1 }}
|
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ __($reportTitle) }} | {{__('IP Bill Period')}} : {{ \Helper::getDisplayDate($fromdate) }} {{__('TO')}} {{ \Helper::getDisplayDate($todate) }} | ||||||||||||||
| {{__('Sr No.')}} | {{__('Trn No')}} | {{__('Trn Date')}} | {{__('Bill Type')}} | @if ($Report_Type == 'D')@else | {{__('Sale Amt MRP')}} | @if ($rateType == 'W'){{__('Sale Amt With GST')}} | {{__('Purchase Amt With GST')}} | @else{{__('Sale Amt Without GST')}} | {{__('Purchase Amt Without GST')}} | @endif{{__('Gross Profit Amt')}} | {{__('Gross Sales Margin')}} % | {{__('Gross Profit')}} % | @endif|||
| {{__('Sr No.')}} | {{__('Product Name')}} | {{__('Sale Qty')}} | {{__('Sale Amt MRP')}} | {{__('Sale Amt')}} | {{__('Purchase Amt')}} | {{__('Gross Profit Amt')}} | {{__('Gross Sales Margin')}} % | {{__('Gross Profit')}} % | |||||||
| (A) | (B) | (C = A - B) | (D = (C / A) * 100) | (E = (C / B) * 100) | |||||||||||
| (A) | (B) | (C = A - B) | (D = (C / A) * 100) | (E = (C / B) * 100) | |||||||||||
| {{__('Total')}} : | {{ \Helper::customAmountFormat($totalSaleMrp) }} | {{ \Helper::customAmountFormat($totalSaleAmt) }} | {{ \Helper::customAmountFormat($totalPurchaseAmt) }} | {{ \Helper::customAmountFormat($totalProfitAmt) }} | @if ($totalSaleAmt != 0){{ \Helper::customAmountFormat(($totalProfitAmt / $totalSaleAmt) * 100) . '%' }} | @else@endif @if ($totalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($totalProfitAmt / $totalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Patient Total')}} : | {{ \Helper::customAmountFormat($patienttotalSaleMrp) }} | {{ \Helper::customAmountFormat($patienttotalSaleAmt) }} | {{ \Helper::customAmountFormat($patienttotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($patienttotalProfitAmt) }} | @if ($patienttotalSaleAmt != 0){{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalSaleAmt) * 100) . '%' }} | @else@endif @if ($patienttotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Entity Total')}} : | {{ \Helper::customAmountFormat($entitytotalSaleMrp) }} | {{ \Helper::customAmountFormat($entitytotalSaleAmt) }} | {{ \Helper::customAmountFormat($entitytotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($entitytotalProfitAmt) }} | @if ($entitytotalSaleAmt != 0){{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalSaleAmt) * 100) . '%' }} | @else@endif @if ($entitytotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| Entity : {{ $entity_name }} | |||||||||||||||
| {{__('Patient')}} : {{ $patient_id . ' / ' . $patient_name }} {{__('IP ID')}} : {{ $ipd_reg_id }} | @if($ipId==''){{__('Discharge Date')}} : @if ($profit->discharge_date!="0000-00-00") {{ \Helper::getDisplayDate($profit->discharge_date) }} @endif | @endif||||||||||||||
| {{ $headerSr++ }} | {{ $profit->trn_type. "/". $profit->trn_fyear. "/" . $profit->trn_id }} | {{ \Helper::getDisplayDate($profit->trn_date) }} | {{ $profit->is_credit_bill=="N"?__('CASH'):'' }} | ||||||||||||
| {{ $transactionSr++ }} | {{ $profit->product_name }} | {{ $profit->quantity }} | {{ \Helper::customAmountFormat($profit->mrp) }} | {{ \Helper::customAmountFormat($profit->sale_amt) }} | {{ \Helper::customAmountFormat($profit->pur_amt) }} | {{ \Helper::customAmountFormat($profitAmt) }} | {{ \Helper::customAmountFormat($MarginPer) . '%' }} | {{ \Helper::customAmountFormat($ProfitPer) . '%' }} | |||||||
| {{__('Total')}} : | {{ \Helper::customAmountFormat($totalSaleMrp) }} | {{ \Helper::customAmountFormat($totalSaleAmt) }} | {{ \Helper::customAmountFormat($totalPurchaseAmt) }} | {{ \Helper::customAmountFormat($totalProfitAmt) }} | @if ($totalSaleAmt != 0){{ \Helper::customAmountFormat(($totalProfitAmt / $totalSaleAmt) * 100) . '%' }} | @else@endif @if ($totalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($totalProfitAmt / $totalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Patient Total')}} : | {{ \Helper::customAmountFormat($patienttotalSaleMrp) }} | {{ \Helper::customAmountFormat($patienttotalSaleAmt) }} | {{ \Helper::customAmountFormat($patienttotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($patienttotalProfitAmt) }} | @if ($patienttotalSaleAmt != 0){{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalSaleAmt) * 100) . '%' }} | @else@endif @if ($patienttotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Entity Total')}} : | {{ \Helper::customAmountFormat($entitytotalSaleMrp) }} | {{ \Helper::customAmountFormat($entitytotalSaleAmt) }} | {{ \Helper::customAmountFormat($entitytotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($entitytotalProfitAmt) }} | @if ($entitytotalSaleAmt != 0){{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalSaleAmt) * 100) . '%' }} | @else@endif @if ($entitytotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Bill Total')}} : | {{ \Helper::customAmountFormat($grossTotalSaleMrp) }} | {{ \Helper::customAmountFormat($grossTotalSaleAmt) }} | {{ \Helper::customAmountFormat($grossTotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($grossTotalProfitAmt) }} | @if ($grossTotalSaleAmt != 0){{ \Helper::customAmountFormat(($grossTotalProfitAmt / $grossTotalSaleAmt) * 100) . '%' }} | @else@endif @if ($grossTotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($grossTotalProfitAmt / $grossTotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{ \Helper::customAmountFormat($totalSaleMrp) }} | {{ \Helper::customAmountFormat($totalSaleAmt) }} | {{ \Helper::customAmountFormat($totalPurchaseAmt) }} | {{ \Helper::customAmountFormat($totalProfitAmt) }} | @if ($totalSaleAmt != 0){{ \Helper::customAmountFormat(($totalProfitAmt / $totalSaleAmt) * 100) . '%' }} | @else@endif @if ($totalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($totalProfitAmt / $totalPurchaseAmt) * 100) . '%' }} | @else@endif | ||||||||
| {{__('Patient Total')}} : | {{ \Helper::customAmountFormat($patienttotalSaleMrp) }} | {{ \Helper::customAmountFormat($patienttotalSaleAmt) }} | {{ \Helper::customAmountFormat($patienttotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($patienttotalProfitAmt) }} | @if ($patienttotalSaleAmt != 0){{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalSaleAmt) * 100) . '%' }} | @else@endif @if ($patienttotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Entity Total')}} : | {{ \Helper::customAmountFormat($entitytotalSaleMrp) }} | {{ \Helper::customAmountFormat($entitytotalSaleAmt) }} | {{ \Helper::customAmountFormat($entitytotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($entitytotalProfitAmt) }} | @if ($entitytotalSaleAmt != 0){{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalSaleAmt) * 100) . '%' }} | @else@endif @if ($entitytotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| Entity : {{ $entity_name }} | |||||||||||||||
| {{__('Patient')}} : {{ $patient_id . ' / ' . $patient_name }} {{__('IP ID')}} : {{ $ipd_reg_id }} | @if($ipId==''){{__('Discharge Date')}} : @if ($profit->discharge_date!="0000-00-00") {{ \Helper::getDisplayDate($profit->discharge_date) }} @endif | @endif||||||||||||||
| {{ $headerSr++ }} | {{ $profit->trn_type. "/". $profit->trn_fyear. "/" . $profit->trn_id }} | {{ \Helper::getDisplayDate($profit->trn_date) }} | {{ $profit->is_credit_bill=="N"?__('CASH'):'' }} | @endif @php $MarginPer = 0; $profitAmt = $profit->sale_amt - $profit->pur_amt; if ($profit->pur_amt != 0) { $ProfitPer = ($profitAmt / $profit->pur_amt) * 100; } if ($profit->sale_amt != 0) { $MarginPer = ($profitAmt / $profit->sale_amt) * 100; } if ($profitAmt < '0') { $negativeBold = 'td bold alignTop borderTopGray txtRight'; } else { $negativeBold = 'td notBold alignTop borderTopGray txtRight'; } if ($ProfitPer < '0') { $negativeBoldPer = 'td bold alignTop borderTopGray txtRight'; } else { $negativeBoldPer = 'td notBold alignTop borderTopGray txtRight'; } if ($MarginPer < '0') { $negativeBoldMargin = 'td bold alignTop borderTopGray txtRight'; } else { $negativeBoldMargin = 'td notBold alignTop borderTopGray txtRight'; } $totalSaleMrp += $profit->mrp; $totalSaleAmt += $profit->sale_amt; $totalPurchaseAmt += $profit->pur_amt; $totalProfitAmt += $profitAmt; if ($patient_id != '') { $patienttotalSaleMrp += $profit->mrp; $patienttotalSaleAmt += $profit->sale_amt; $patienttotalPurchaseAmt += $profit->pur_amt; $patienttotalProfitAmt += $profitAmt; } $entitytotalSaleMrp += $profit->mrp; $entitytotalSaleAmt += $profit->sale_amt; $entitytotalPurchaseAmt += $profit->pur_amt; $entitytotalProfitAmt += $profitAmt; $grossTotalSaleMrp += $profit->mrp; $grossTotalSaleAmt += $profit->sale_amt; $grossTotalPurchaseAmt += $profit->pur_amt; $grossTotalProfitAmt += $profitAmt; $oldTrnType = $profit->trn_type; $oldTrnId = $profit->trn_id; if ($patient_id != '') { $oldPatient = $patient_id; $oldEntity = $entity_name; } @endphp @endforeach @endif{{ \Helper::customAmountFormat($totalSaleMrp) }} | {{ \Helper::customAmountFormat($totalSaleAmt) }} | {{ \Helper::customAmountFormat($totalPurchaseAmt) }} | {{ \Helper::customAmountFormat($totalProfitAmt) }} | @if ($totalSaleAmt != 0){{ \Helper::customAmountFormat(($totalProfitAmt / $totalSaleAmt) * 100) . '%' }} | @else@endif @if ($totalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($totalProfitAmt / $totalPurchaseAmt) * 100) . '%' }} | @else@endif | ||||
| {{__('Patient Total')}} : | {{ \Helper::customAmountFormat($patienttotalSaleMrp) }} | {{ \Helper::customAmountFormat($patienttotalSaleAmt) }} | {{ \Helper::customAmountFormat($patienttotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($patienttotalProfitAmt) }} | @if ($patienttotalSaleAmt != 0){{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalSaleAmt) * 100) . '%' }} | @else@endif @if ($patienttotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($patienttotalProfitAmt / $patienttotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Entity Total')}} : | {{ \Helper::customAmountFormat($entitytotalSaleMrp) }} | {{ \Helper::customAmountFormat($entitytotalSaleAmt) }} | {{ \Helper::customAmountFormat($entitytotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($entitytotalProfitAmt) }} | @if ($entitytotalSaleAmt != 0){{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalSaleAmt) * 100) . '%' }} | @else@endif @if ($entitytotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($entitytotalProfitAmt / $entitytotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{__('Bill Total')}} : | {{ \Helper::customAmountFormat($grossTotalSaleMrp) }} | {{ \Helper::customAmountFormat($grossTotalSaleAmt) }} | {{ \Helper::customAmountFormat($grossTotalPurchaseAmt) }} | {{ \Helper::customAmountFormat($grossTotalProfitAmt) }} | @if ($grossTotalSaleAmt != 0){{ \Helper::customAmountFormat(($grossTotalProfitAmt / $grossTotalSaleAmt) * 100) . '%' }} | @else@endif @if ($grossTotalPurchaseAmt != 0) | {{ \Helper::customAmountFormat(($grossTotalProfitAmt / $grossTotalPurchaseAmt) * 100) . '%' }} | @else@endif | |||||||
| {{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }} | |||||||||||||||
| {{__($reportTitle)}} | {{__('IP Bill Period')}} : {{ \Helper::getDisplayDate($fromdate) }} {{__('TO')}} {{ \Helper::getDisplayDate($todate) }} | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{__('Entity Name')}} | {{__('Sales Amt MRP')}} | {{__('Cash Bill Total')}} | {{__('Credit Bill Total')}} | {{__('Sales Amt')}} | {{__('Purchase Amt')}} | {{__('Gross Profit Amt')}} | {{__('Hospital Share')}} | {{__('Pharmacy Share')}} | {{__('Gross Sales Margin')}} % | {{__('Gross Profit')}} % | |||||||||
| Total : | {{ \Helper::customAmountFormat($summSelesTotal) }} | {{ \Helper::customAmountFormat($summCashBillTotal) }} | {{ \Helper::customAmountFormat($summCreditBIllTotal) }} | {{ \Helper::customAmountFormat($summATotal) }} | {{ \Helper::customAmountFormat($summBTotal) }} | {{ \Helper::customAmountFormat($summATotal-$summBTotal) }} | {{ \Helper::customAmountFormat($summDTotal) }} | {{ \Helper::customAmountFormat($summETotal) }} | {{ \Helper::customAmountFormat((($summATotal-$summBTotal)/$summATotal)*100)."%" }} | {{ \Helper::customAmountFormat((($summATotal-$summBTotal)/$summBTotal)*100).'%' }} | |||||||||
| {{$additionalInfo}} | (A) | (B) | (C = A - B) | {{$hospitalSharePercent}}% | {{$pharmacySharePercent}}% | (D= (C / A) * 100) | (E = (C / B) * 100) | ||||||||||||
| {{ $bEntityName }} | {{ \Helper::customAmountFormat($summ_mrp) }} | {{ \Helper::customAmountFormat($summ_cashbill) }} | {{ \Helper::customAmountFormat($summ_creditbill) }} | {{ \Helper::customAmountFormat($A) }} | {{ \Helper::customAmountFormat($B) }} | {{ \Helper::customAmountFormat($C) }} | {{ \Helper::customAmountFormat($D) }} | {{ \Helper::customAmountFormat($E) }} | {{ \Helper::customAmountFormat($F)."%" }} | {{ \Helper::customAmountFormat($G).'%' }} | |||||||||
| Total : | {{ \Helper::customAmountFormat($summSelesTotal) }} | {{ \Helper::customAmountFormat($summCashBillTotal) }} | {{ \Helper::customAmountFormat($summCreditBIllTotal) }} | {{ \Helper::customAmountFormat($summATotal) }} | {{ \Helper::customAmountFormat($summBTotal) }} | {{ \Helper::customAmountFormat($summATotal-$summBTotal) }} | {{ \Helper::customAmountFormat((($summATotal-$summBTotal)*$hospitalSharePercent)/100) }} | {{ \Helper::customAmountFormat((($summATotal-$summBTotal)*$pharmacySharePercent)/100) }} | {{ \Helper::customAmountFormat((($summATotal-$summBTotal)/$summATotal)*100)."%" }} | {{ \Helper::customAmountFormat((($summATotal-$summBTotal)/$summBTotal)*100).'%' }} | |||||||||
| {{__('Grand Total')}} : | {{ \Helper::customAmountFormat($grandTotalSales) }} | {{ \Helper::customAmountFormat($grandTotalCashBill) }} | {{ \Helper::customAmountFormat($grandTotalCreditBill) }} | {{ \Helper::customAmountFormat($grandTotalA) }} | {{ \Helper::customAmountFormat($grandTotalB) }} | {{ \Helper::customAmountFormat($grandTotalC) }} | {{ \Helper::customAmountFormat($grandTotalD) }} | {{ \Helper::customAmountFormat($grandTotalE) }} | {{ \Helper::customAmountFormat((($grandTotalA-$grandTotalB)/$grandTotalA)*100)."%" }} | {{ \Helper::customAmountFormat((($grandTotalA-$grandTotalB)/$grandTotalB)*100).'%' }} | {{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }} | ||||||||