@extends('Reports.template') @section('title') Pharmacy User Wise Collection Report @endsection @section('ExternalCss') @parent @endsection @section('Content') @php $currentTime = \Carbon\Carbon::now(); $columnCount = count($paymentModeData); @endphp @foreach ($paymentModeData as $paymentMode) @endforeach @php $sr = 1; $grandTotalAmount = array(); @endphp @foreach ($paymentModeData as $paymentMode) @php $grandTotalAmount[$paymentMode] = 0; @endphp @endforeach @foreach($billData as $bill) @php $totalAmount = array(); foreach ($paymentModeData as $paymentMode) { $totalAmount[$paymentMode] = 0; } if ($bill->patient_name != '') { $patOrCustName = $bill->patient_id . " / " . $bill->patient_name; } else if ($bill->ph_cust_name != '') { $patOrCustName = '*' . $bill->ph_cust_id . " / " . $bill->ph_cust_name; } else { $patOrCustName = $bill->supplier_name . "( " . $bill->purchase_bill_no . " )"; } $headerBillAmount = ($bill->trn_type == 'I' || $bill->trn_type == 'PR') ? $bill->total : $bill->total * (-1); $totalAmount[$bill->gm_description] = $headerBillAmount; $grandTotalAmount[$bill->gm_description] += $headerBillAmount; if (strtoupper($bill->payment_agency != '')) { $message = $bill->gm_description . "," . strtoupper($bill->payment_agency) . "," . strtoupper($bill->payment_number); } else { $message = $bill->gm_description; } @endphp @foreach ($paymentModeData as $paymentMode) @endforeach @endforeach @foreach($receiptData as $receipt) @php $totalReceiptAmount = array(); foreach ($paymentModeData as $paymentMode) { $totalReceiptAmount[$paymentMode] = 0; } $patOrCustName = ($receipt->patient_name != '') ? $receipt->patient_id." / ".$receipt->patient_name : '*'.$receipt->ph_cust_id." / ".$receipt->ph_cust_name; $receiptAmount = $receipt->receipt_amount; $totalReceiptAmount[$receipt->gm_description] = $receiptAmount; $grandTotalAmount[$receipt->gm_description] += $receiptAmount; if(strtoupper($receipt->payment_agency != '')){ $message = $receipt->gm_description . "," . strtoupper($receipt->payment_agency) . "," . strtoupper($receipt->payment_number) . " towards Bills " . $receipt->bill_no ; }else{ $message = $receipt->gm_description . " towards Bills " . $receipt->bill_no; } @endphp @foreach ($paymentModeData as $paymentMode) @endforeach @endforeach @foreach ($paymentModeData as $paymentMode) @endforeach
@if($businessEntityMasterData[0]->logo != null) Pharmacy Logologo )}}"/> @endif
{{ $businessEntityMasterData[0]->name }}
{{$businessEntityMasterData[0]->add1. " " .$businessEntityMasterData[0]->add2 ." ".$businessEntityMasterData[0]->city." : " .$businessEntityMasterData[0]->pincode }}
{{"Phone : ".$businessEntityMasterData[0]->tel1}}
Pharmacy User Wise Collection Report @if($fromTime != "" && $toTime != "") Period : {{\Helper::getDisplayDateTime($fromDate." ".$fromTime)}} TO {{\Helper::getDisplayDateTime($toDate." ".$toTime)}} @else Period : {{\Helper::getDisplayDate($fromDate)}} TO {{\Helper::getDisplayDate($toDate)}} @endif
Sr No Bill No   Bill Date Time Patient / Supplier Name Payment Details {{ strtoupper($paymentMode) }}  User Id
{{ $sr++ }} {{ $bill->trn_type ."/". $bill->trn_fyear. "/". $bill->trn_id }}  {{ \Helper::getDisplayDateTime($bill->trn_date ." ". $bill->ph_created_time) }} {{ $patOrCustName }} {{ $message }} {{ \Helper::customAmountFormat($totalAmount[$paymentMode]) }}  {{ $bill->created_by }}
{{ $sr++ }} {{ $receipt->trn_receipt_no }}  {{ \Helper::getDisplayDateTime($receipt->trn_receipt_date ." ". $receipt->created_time) }} {{ $patOrCustName }} {{ $message }} {{ \Helper::customAmountFormat($totalReceiptAmount[$paymentMode]) }}  {{ $receipt->created_by }}
Total :{{ \Helper::customAmountFormat($grandTotalAmount[$paymentMode]) }}
{{Config::get('constants.asterisk.WALK_CUST')}} {{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}


Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection