@extends('Reports.template') @if($trnType == "DC") @php $reportTitle = "Delivery Challan Register Report"; @endphp @elseif($trnType == "DCR") @php $reportTitle = "Delivery Challan Return Register Report"; @endphp @else @php $reportTitle = "Delivery Challan & Delivery Challan Return Register Report"; @endphp @endif @section('title') {{$reportTitle}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @php $billTypeTitle = "Credit"; if($trnStatus === 'P'){ $trnStatusMessage = "Partial"; }else if($trnStatus === 'T'){ $trnStatusMessage = "Cancelled"; }else if($trnStatus === 'C'){ $trnStatusMessage = "Completed"; }else{ $trnStatusMessage = "ALL"; } @endphp @if(!is_null($rate_card_master)) @endif @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 == "DC") @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 @endif @if($reportType === 'B') @php $refTrnNo = 0; @endphp @if($productTransaction->trn_type != "DC" && $productTransaction->ref_trn_id != 0) @php $refTrnNo = "DC" . $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 == "DC") @php $footerHeading = "Total Delivery Challan : " @endphp @else @php $footerHeading = "Total Delivery Challan Return : " @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}}
{{$reportTitle." "}} Store : {{$storeName}} Period : {{ \Helper::getDisplayDate($fromDate) }} TO {{ \Helper::getDisplayDate($toDate) }}
Patient Category : @php $cat=""; foreach ($rate_card_master as $item) $cat.= $item->rate_card .'-'. $item->rate_type .', '; @endphp {{ rtrim($cat,', ') }}
DC No   DC Date Payment Received Patient / Customer Name Gross Disc Invoice R.Off Net Amount
Sr   Medicine Name HSN Code Mfg Category Unit Ref No.  Batch Exp Qty MRP Disc% Disc 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->trn_fyear."/".$productTransaction->ph_trn_id }}   {{ \Helper::getDisplayDate($productTransaction->trn_date) }} {{ ($productTransaction->is_fully_paid == 'Y') ? 'Yes' : 'No' }} {{ $patOrCustName }} {{ \Helper::customAmountFormat($phGrossTotal) }} {{ \Helper::customAmountFormat($phDiscountAmt) }} {{ \Helper::customAmountFormat($phInvoiceAmt) }} {{ \Helper::customAmountFormat($phRoundOff) }} {{ \Helper::customAmountFormat($phTotal) }}
{{$transactionSr++}}   {{ \Helper::zeroValueToDash($productTransaction->product_name) }} {{ \Helper::zeroValueToDash($productTransaction->product_hsn_code) }} {{ \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->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->invoice_amt)}} {{\Helper::customAmountFormat($summary->round_off)}} {{\Helper::customAmountFormat($summary->total)}}
Total Bills : {{\Helper::zeroValueToNbspSpace($summaryBills)}} {{\Helper::customAmountFormat($summaryGrossTotal)}} {{\Helper::customAmountFormat($summaryDiscount)}} {{\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