@extends('Reports.template') @section('title') @php if($trnType == 'I') $title = 'Sales Bill'; else if($trnType == 'IR') $title = 'Sales Return Bill'; else if($trnType == 'DC') $title = 'DC Bill'; else if($trnType == 'DCR') $title = 'DC Return Bill'; @endphp {{$title}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @php $doctorName = ''; if ($productHeader[0]->doctor_name != '') { $doctorName = $productHeader[0]->doctor_name; } if($paraDoctor != 'false'){ $doctorName = $paraDoctor; } $patientAdress = ''; if ($productHeader[0]->patient_add1 != '') { $patientAdress = $productHeader[0]->patient_add1 . " / " . $productHeader[0]->patient_add2; } $trnDate = date("d/m/Y", strtotime(str_replace("-", "/", $productHeader[0]->trn_date))); $reportTitle = 'PHARMACY BILL'; $no = Config::get('constants.transaction.SALE_TRN_NO').' : '; $date = Config::get('constants.transaction.SALE_TRN_DATE').' : '; if($trnType == 'I'){ // $reportTitle = 'PHARMACY BILL1'; // $no = Config::get('constants.transaction.SALE_TRN_NO').' : '; //$date = Config::get('constants.transaction.SALE_TRN_DATE').' : '; }else if ($trnType == 'IR'){ if($productHeader[0]->is_credit_bill == 'Y'){ $reportTitle = 'MEDICINE RETURN NOTE'; }else{ $reportTitle = 'MEDICINE RETURN NOTE'; } $no = 'MR No : '; $date = 'MR Date : '; } @endphp @php $i = 1; $mrp = 0; $totalGstAmount = 0; $netTotal = 0; $mrpValue = 0; $totalQty = 0; $totalmrpValue = 0; @endphp @foreach ($productTransactionData as $key =>$productTransaction) @php $time = strtotime($productTransaction->batch_exp); $month = date("m",$time); $year = date("y",$time); $batchExp = $month."/".$year; if($year == "70"){ $batchExp = ""; } $gstPercentage = (float)$productTransaction->sgst_percentage + (float)$productTransaction->cgst_percentage; $gstAmount = (float)$productTransaction->sgst_value + (float)$productTransaction->cgst_value; $totalGstAmount += $gstAmount; $totalQty += $productTransaction->quantity; $netTotal = $productTransaction->total - $productTransaction->discount_amt; $mrpValue = round($productTransaction->quantity*$productTransaction->mrp,2); $totalmrpValue += $mrpValue; $discountPercentage = ($productTransaction->discount_type == 'P' || $productTransaction->discount_type == NULL ) ? number_format($productTransaction->discount,1) : '' ; @endphp @php $mrp += $productTransaction->mrp @endphp @endforeach @php $totalGstValue = (float)$productTransaction->sgst_value + (float)$productTransaction->cgst_value @endphp @if($productHeader[0]->rate_card != "") @endif @if($productHeader[0]->room_id != "" && $productHeader[0]->discharge_date == "0000-00-00" ) @endif @if(!empty($businessEntityMasterData[0]->remarks)) @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 }}
{{$no.$productHeader[0]->trn_type." / ".$productHeader[0]->trn_id}}
{{'TAX INVOICE'}}
{{$date.$trnDate}}
@php if($productHeader[0]->patient_id == NULL || $productHeader[0]->patient_id == '0'){ $patOrCustDetail = "Customer : " . $productHeader[0]->ph_cust_id." / ".$productHeader[0]->ph_cust_name; }else{ if($productHeader[0]->is_ptr_applicable == "Y"){ $patOrCustDetail = "Patient : " . $productHeader[0]->patient_id." / ".$productHeader[0]->patient_name." (C/o $companyName)"; }else{ $patOrCustDetail = "Patient : " . $productHeader[0]->patient_id." / ".$productHeader[0]->patient_name; } } @endphp {{$patOrCustDetail}}
Address : {{$patientAdress}}
Doctor : {{$doctorName}}
Sr.   Item Name Pkg   Batch Exp
MRP Qty Total Dis.%   Dis. Taxable
SGST%   SGST   CGST%   CGST Amount
{{ $i++ }}   {{ substr($productTransaction->product_name, 0, 32) }} {{$productTransaction->conversion_factor }}   {{ $productTransaction->batch_no }} {{$batchExp}}
{{ number_format($productTransaction->mrp,2) }} {{ $productTransaction->quantity }} {{ number_format($mrpValue,2) }} {{ $discountPercentage }}   {{ number_format($productTransaction->discount_amt,2) }} {{ number_format($productTransaction->taxable_amt,2) }}
{{ number_format($productTransaction->cgst_percentage,1) }}   {{ number_format($productTransaction->cgst_value,2) }}   {{ number_format($productTransaction->sgst_percentage,1) }}   {{ number_format($productTransaction->sgst_value,2) }} {{ number_format($netTotal,2) }}
Total Qty : {{$totalQty}}
Gross Total : {{\Helper::zeroValueToNbspSpace(number_format($totalmrpValue,2)) }}
Total Discount : {{\Helper::zeroValueToNbspSpace(number_format($productHeader[0]->discount_amt,2)) }}
Total Amount : {{\Helper::zeroValueToNbspSpace(number_format($productHeader[0]->invoice_amt,2)) }}
ROUND OFF : {{\Helper::zeroValueToNbspSpace(number_format($productHeader[0]->round_off,2)) }}
NET TOTAL : {{\Helper::zeroValueToNbspSpace(number_format($productHeader[0]->total,2)) }}
REMARK : {{strtoupper($productHeader[0]->remarks)}}
@if($productHeader[0]->total >= 0) RUPEES {{ strtoupper(\Helper::convertNumber($productHeader[0]->total) . " only") }} @if($productHeader[0]->is_credit_bill == 'N') {{"By ".strtoupper($productHeader[0]->gm_description) }} @endif @if(strtoupper($productHeader[0]->payment_agency != '')) {{", ".strtoupper($productHeader[0]->payment_agency) }} {{", ".strtoupper($productHeader[0]->payment_number) }} @endif @endif
{{"Patient Type : ".$productHeader[0]->rate_card}}
{{"Room : ". $productHeader[0]->room_id ." / ".$productHeader[0]->room_cat_dis." / Floor : ".$productHeader[0]->floor}}
D.L NO : {{$businessEntityMasterData[0]->dl_no}}
GST NO : {{$businessEntityMasterData[0]->gsttin_no}}


E. & O.E.    For, {{ strtoupper(($businessEntityMasterData[0]->name)) }}
{!! $businessEntityMasterData[0]->remarks !!}
Print By : {{ strtoupper($userId)." # ".$currentTime->format('d/m/Y H:i:s ')}}
Created By : {{strtoupper($productHeader[0]->ph_created_by.' # '.\Helper::getDisplayDateTime($productHeader[0]->ph_created_date))}}
@php if($trnType == 'I') $url = url('Item/issue'); else if($trnType == 'IR') $url = url('Item/issueReturn'); else if($trnType == 'DC') $url = url('Item/deliveryChallan'); else if($trnType == 'DCR') $url = url('Item/deliveryChallanReturn'); @endphp Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection