@extends('Reports.template') @if($trnType == "I") @php $reportTitle = 'User Wise Sales Register'; @endphp @elseif($trnType == "IR") @php $reportTitle = 'Sale Return Register Report'; @endphp @else @php $reportTitle = 'Sale & Sale Return Register Report'; @endphp @endif @section('title') {{$reportTitle}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @php if($billType === 'P'){ $billTypeTitle = "Cash"; }else if($billType === 'C'){ $billTypeTitle = "Credit"; }else if ($billType === 'B'){ $billTypeTitle = "Both"; } if($trnStatus === 'P'){ $trnStatusMessage = "Partial"; }else if($trnStatus === 'T'){ $trnStatusMessage = "Cancelled"; }else if($trnStatus === 'C'){ $trnStatusMessage = "Completed"; }else{ $trnStatusMessage = "ALL"; } @endphp @if($reportType === 'B') @endif @php $oldPhTrnType = ''; $oldPhTrnId = ''; $datetime =0; $headerSr = 1; $transactionSr = 1; $totalQty = 0; $remark = ''; $totalFreeQty = 0; $totalAmount = 0; $patOrCustName=0; $createdBy = ''; $strike = 'noStrike'; $summaryBills = 0; $summaryGrossTotal = 0; $summaryDiscount = 0; $summaryNetTaxable = 0; $summaryCgst = 0; $summarySgst = 0; $summaryInvoiceAmt = 0; $summaryRoundOff = 0; $summaryTotal = 0; @endphp @foreach ($productTransactionData as $key =>$productTransaction) @if($productTransaction->ph_trn_id != $oldPhTrnId || $productTransaction->ph_trn_type != $oldPhTrnType) @if($totalQty != 0) @if($reportType === 'B') @endif @endif @php $transactionSr = 1; $strike = 'noStrike'; if($productTransaction->patient_name != ''){ $patOrCustName = $productTransaction->patient_id." / ".$productTransaction->patient_name; }else{ $patOrCustName = '*'.$productTransaction->ph_cust_id." / ".$productTransaction->ph_cust_name; } $totalQty = 0; $remark = ''; $datetime =0; $totalAmount = 0; @endphp @if($productTransaction->ph_trn_status == 'T') @php $strike = 'strike'; @endphp @endif @if($productTransaction->trn_type == "I") @php $phGrossTotal = $productTransaction->ph_gross_total; $phDiscountAmt = $productTransaction->ph_discount_amt; $phNetTaxableAmt = $productTransaction->ph_net_taxable_amt; $phCgstAmt = $productTransaction->ph_cgst_amt; $phSgstAmt = $productTransaction->ph_sgst_amt; $phInvoiceAmt = $productTransaction->ph_invoice_amt; $phRoundOff = $productTransaction->ph_round_off; $phTotal = $productTransaction->ph_total; @endphp @else @php $phGrossTotal = -1 * $productTransaction->ph_gross_total; $phDiscountAmt = -1 * $productTransaction->ph_discount_amt; $phNetTaxableAmt = -1 * $productTransaction->ph_net_taxable_amt; $phCgstAmt = -1 * $productTransaction->ph_cgst_amt; $phSgstAmt = -1 * $productTransaction->ph_sgst_amt; $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 @endif @if($reportType === 'B') @php $refTrnNo = 0; @endphp @if($productTransaction->trn_type != "I" && $productTransaction->ref_trn_id != 0) @php $refTrnNo = "I" . $productTransaction->ref_trn_id; @endphp @endif @endif @php $totalQty += $productTransaction->quantity; $remark = $productTransaction->ph_remarks; $totalAmount += $productTransaction->total; $datetime =$productTransaction->created_date; $createdBy = strtoupper($productTransaction->ph_created_by); $oldPhTrnType = $productTransaction->ph_trn_type; $oldPhTrnId = $productTransaction->ph_trn_id; @endphp @endforeach @if($reportType === 'B') @endif @foreach ($saleSummary as $key =>$summary) @if($summary->trn_type == "I") @php $footerHeading = "Total Sale Bills : " @endphp @else @php $footerHeading = "Total Sale Return Bills : " @endphp @endif @php $summaryBills += $summary->Bills; $summaryGrossTotal += $summary->gross_total; $summaryDiscount += $summary->discount; $summaryNetTaxable += $summary->netTaxable; $summaryCgst += $summary->cgst; $summarySgst += $summary->sgst; $summaryInvoiceAmt += $summary->invoice_amt; $summaryRoundOff += $summary->round_off; $summaryTotal += $summary->total; @endphp @endforeach @if(!empty($saleSummary)) @endif @php $currentTime = \Carbon\Carbon::now(); @endphp
@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}}
User Wise Sales Register Store : {{$storeName}} Period : {{ \Helper::getDisplayDate($fromDate) }} TO {{ \Helper::getDisplayDate($toDate) }}
Bill No  Bill Date ptm Received patient title ptm Mode Patient / Customer Name Gross Disc Net Taxable CGST SGST Invoice R.Off Net Amount Created By
Sr   Medicine Name Mfg Category Unit Ref No.  Batch Exp Qty MRP Disc% Disc Taxable GST% GST Amount
@if($remark != '')   Remarks : {{$remark}} @endif Total Qty : {{\Helper::zeroValueToDash($totalQty)}}
  D.L NO : {{$businessEntityMasterData[0]->dl_no}} GST NO : {{$businessEntityMasterData[0]->gsttin_no}} {{"Created By : "}} @if($createdBy) {{$createdBy ." ".Carbon\Carbon::parse($datetime)->format('d-m-Y h:i:s')}} @endif
@if($productTransaction->is_credit_bill == 'Y')@endif {{ $productTransaction->trn_type.$productTransaction->ph_trn_id }}   {{ \Helper::getDisplayDate($productTransaction->trn_date) }} {{ ($productTransaction->is_fully_paid == 'Y') ? 'Yes' : 'No' }} {{ $productTransaction->rate_card }} {{ $paymentMode }} {{ $patOrCustName }} {{ \Helper::customAmountFormat($phGrossTotal) }} {{ \Helper::customAmountFormat($phDiscountAmt) }} {{ \Helper::customAmountFormat($phNetTaxableAmt) }} {{ \Helper::customAmountFormat($phCgstAmt) }} {{ \Helper::customAmountFormat($phSgstAmt) }} {{ \Helper::customAmountFormat($phInvoiceAmt) }} {{ \Helper::customAmountFormat($phRoundOff) }} {{ \Helper::customAmountFormat($phTotal) }} {{ $productTransaction->ph_created_by }}
{{$transactionSr++}}   {{ \Helper::zeroValueToDash($productTransaction->product_name) }} {{ \Helper::zeroValueToDash($productTransaction->manufacturer_name) }} {{ \Helper::zeroValueToDash($productTransaction->category_abbrev) }} {{ \Helper::zeroValueToDash($productTransaction->unit_abbrev) }} {{ \Helper::zeroValueToDash($refTrnNo) }} {{ $productTransaction->batch_no }} {{ \Helper::getMonthYearFromDate($productTransaction->batch_exp) }} {{ $productTransaction->quantity }} {{ \Helper::customAmountFormat($productTransaction->mrp) }} {{ \Helper::customAmountFormat($productTransaction->discount) }} {{ \Helper::customAmountFormat($productTransaction->discount_amt) }} {{ \Helper::customAmountFormat($productTransaction->taxable_amt) }} {{ \Helper::customAmountFormat(floatval($productTransaction->sgst_percentage) + floatval($productTransaction->cgst_percentage)) }} {{ \Helper::customAmountFormat(floatval($productTransaction->sgst_value)+floatval($productTransaction->cgst_value)) }} {{ \Helper::customAmountFormat($productTransaction->total) }}
@if($remark != '')   Remarks : {{$remark}} @endif Total Qty : {{\Helper::zeroValueToDash($totalQty)}}
  D.L NO : {{$businessEntityMasterData[0]->dl_no}} GST NO : {{$businessEntityMasterData[0]->gsttin_no}} {{"Created By : "}} @if($createdBy) {{$createdBy ." ".Carbon\Carbon::parse($datetime)->format('d-m-Y h:i:s')}} @endif
{{$footerHeading." ".\Helper::zeroValueToNbspSpace($summary->Bills)}} {{\Helper::customAmountFormat($summary->gross_total)}} {{\Helper::customAmountFormat($summary->discount)}} {{\Helper::customAmountFormat($summary->netTaxable)}} {{\Helper::customAmountFormat($summary->cgst)}} {{\Helper::customAmountFormat($summary->sgst)}} {{\Helper::customAmountFormat($summary->invoice_amt)}} {{\Helper::customAmountFormat($summary->round_off)}} {{\Helper::customAmountFormat($summary->total)}}
Total Bills : {{\Helper::zeroValueToNbspSpace($summaryBills)}} {{\Helper::customAmountFormat($summaryGrossTotal)}} {{\Helper::customAmountFormat($summaryDiscount)}} {{\Helper::customAmountFormat($summaryNetTaxable)}} {{\Helper::customAmountFormat($summaryCgst)}} {{\Helper::customAmountFormat($summarySgst)}} {{\Helper::customAmountFormat($summaryInvoiceAmt)}} {{\Helper::customAmountFormat($summaryRoundOff)}} {{\Helper::customAmountFormat($summaryTotal)}}
{{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