@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) @endif |
{{ $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 | @elseSale Amt Without GST | Purchase Amt Without GST | @endifGross 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 $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 ') }} |
Entity Wise Summery | 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 % | |||||||||
(A) | (B) | (C = A - B) | 85% | 15% | (D= (C / A) * 100) | (E = (C / B) * 100) | |||||||||||||
{{ $oldEntity }} | {{ \Helper::customAmountFormat($mrp) }} | {{ \Helper::customAmountFormat($cash_bill) }} | {{ \Helper::customAmountFormat($credit_bill) }} | {{ \Helper::customAmountFormat($A) }} | {{ \Helper::customAmountFormat($B) }} | {{ \Helper::customAmountFormat($A-$B) }} | {{ \Helper::customAmountFormat((($A-$B)*85)/100) }} | {{ \Helper::customAmountFormat((($A-$B)*15)/100) }} | {{ \Helper::customAmountFormat((($A-$B)/$A)*100)."%" }} | {{ \Helper::customAmountFormat((($A-$B)/$B)*100).'%' }} | |||||||||
{{ $oldEntity }} | {{ \Helper::customAmountFormat($mrp) }} | {{ \Helper::customAmountFormat($cash_bill) }} | {{ \Helper::customAmountFormat($credit_bill) }} | {{ \Helper::customAmountFormat($A) }} | {{ \Helper::customAmountFormat($B) }} | {{ \Helper::customAmountFormat($A-$B) }} | {{ \Helper::customAmountFormat((($A-$B)*85)/100) }} | {{ \Helper::customAmountFormat((($A-$B)*15)/100) }} | {{ \Helper::customAmountFormat((($A-$B)/$A)*100)."%" }} | {{ \Helper::customAmountFormat((($A-$B)/$B)*100).'%' }} | |||||||||
Total : | {{ \Helper::customAmountFormat($totalmrp) }} | {{ \Helper::customAmountFormat($totalcash_bill) }} | {{ \Helper::customAmountFormat($totalcredit_bill) }} | {{ \Helper::customAmountFormat($totalA) }} | {{ \Helper::customAmountFormat($totalB) }} | {{ \Helper::customAmountFormat($totalA-$totalB) }} | {{ \Helper::customAmountFormat((($totalA-$totalB)*85)/100) }} | {{ \Helper::customAmountFormat((($totalA-$totalB)*15)/100) }} | {{ \Helper::customAmountFormat((($totalA-$totalB)/$totalA)*100)."%" }} | {{ \Helper::customAmountFormat((($totalA-$totalB)/$totalB)*100).'%' }} | {{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }} |