@extends('Reports.template') @section('title') @php $title= "GST Credit Note"; @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_village != '') { $patientAdress = $productHeader[0]->patient_village; } $trnDate = date("d/m/Y", strtotime(str_replace("-", "/", $productHeader[0]->trn_date))); $reportTitle = 'GST CREDIT NOTE '; $no = "GCR No : "; $date = "GCR Date : "; @endphp @php $i = 1; $sgstAmount = 0; $cgstAmount = 0; $netTotal = 0; $totalQty = 0; $oldRefTrnType = ''; $oldRefTrnId = 0; $totaltaxable_amt=0; $totalRef_taxable_amt=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; $sgstAmount += (float)$productTransaction->sgst_value; $cgstAmount += (float)$productTransaction->cgst_value; $totalQty += $productTransaction->quantity; $netTotal += $productTransaction->total; $totaltaxable_amt += $productTransaction->taxable_amt; $totalRef_taxable_amt += $ref_productTransactionDetail[$key]->total; @endphp @if($productTransaction->product_hsn_code!='0' && $productTransaction->product_hsn_code!=NULL && $hsncode->value == 'Y') @php $productHsnCode = " --- (".$productTransaction->product_hsn_code.")"; @endphp @else @php $productHsnCode = ''; @endphp @endif @php $oldRefTrnType = $productTransaction->ref_trn_type; $oldRefTrnId = $productTransaction->ref_trn_id; @endphp @endforeach @php $totalGstValue = (float)$productTransaction->sgst_value + (float)$productTransaction->cgst_value @endphp @endif @if(isset($businessEntityMasterData[0]->name) ) @if(!empty($businessEntityMasterData[0]->remarks)) @endif @endif @php $currentTime = \Carbon\Carbon::now(); @endphp
@if(isset($businessEntityMasterData[0]->logo) ) Pharmacy Logologo )}}"/> @endif @if(isset($businessEntityMasterData[0]->name) )
{{ $businessEntityMasterData[0]->name }}
@endif @if(isset($businessEntityMasterData[0]->add1) && isset($businessEntityMasterData[0]->add2) && isset($businessEntityMasterData[0]->city) && isset($businessEntityMasterData[0]->pincode))
{{$businessEntityMasterData[0]->add1. " " .$businessEntityMasterData[0]->add2 ." ".$businessEntityMasterData[0]->city." : " .$businessEntityMasterData[0]->pincode }}
@endif @if(isset($businessEntityMasterData[0]->tel1) )
{{"Phone : ".$businessEntityMasterData[0]->tel1}}
@endif
{{'CREDIT NOTE'}}
@php if($productHeader[0]->patient_id == NULL || $productHeader[0]->patient_id == '0'){ $patOrCustDetail = "Customer : " . $productHeader[0]->ph_cust_id." / ".$productHeader[0]->ph_cust_name." / ".$productHeader[0]->ph_cust_contact_no; }else{ if($productHeader[0]->is_ptr_applicable == "Y"){ $patOrCustDetail = "Patient : " . $productHeader[0]->patient_id." / ".$productHeader[0]->patient_name." / ".$productHeader[0]->patient_contact1." (C/o $companyName)"; }else{ $patOrCustDetail = "Patient : " . $productHeader[0]->patient_id." / ".$productHeader[0]->patient_name." / ".$productHeader[0]->patient_contact1; } } @endphp {{$patOrCustDetail}}
Address : {{$patientAdress}}
{{$reportTitle }}
Prescribed By : {{$doctorName}}
{{$no.$productHeader[0]->trn_type." / ".$productHeader[0]->trn_fyear." / ".$productHeader[0]->trn_id}}
{{$date.$trnDate}}
Sr.   Item Name  Batch Category PUOM Pkg Qty GST % Original Amt Revised Amt Difference Amt Taxable Amt CGST SGST
{{ $i++ }}   {{ substr($productTransaction->product_name, 0, 35).$productHsnCode }} {{ $productTransaction->batch_no }} {{$productTransaction->category_abbrev }} {{$productTransaction->unit_abbrev}} {{ $productTransaction->conversion_factor }} {{ $productTransaction->quantity }} {{ $gstPercentage }} {{ number_format($ref_productTransactionDetail[$key]->total,2) }} {{ number_format($ref_productTransactionDetail[$key]->total-$productTransaction->total,2) }} {{ number_format($productTransaction->total,2) }} {{ number_format($productTransaction->taxable_amt,2) }} {{ number_format($productTransaction->cgst_value,2) }} {{ number_format($productTransaction->sgst_value,2) }}
Refrence : {{$ref_productTransactionDetail[0]->trn_type." / ".$ref_productTransactionDetail[0]->trn_fyear." / ".$ref_productTransactionDetail[0]->trn_id}} {{$totalQty }} {{\Helper::zeroValueToNbspSpace(number_format($totalRef_taxable_amt,2))}} {{\Helper::zeroValueToNbspSpace(number_format($totalRef_taxable_amt-$netTotal,2))}} {{\Helper::zeroValueToNbspSpace(number_format($netTotal,2))}} {{\Helper::zeroValueToNbspSpace(number_format($totaltaxable_amt,2))}} {{\Helper::zeroValueToNbspSpace(number_format($cgstAmount,2))}} {{\Helper::zeroValueToNbspSpace(number_format($sgstAmount,2))}}
REMARK : {{strtoupper($productHeader[0]->remarks)}}
@if($productHeader[0]->total >= 0) RUPEES {{ strtoupper(\Helper::convertNumber($productHeader[0]->total) . " only") }} @endif NET TOTAL : {{\Helper::zeroValueToNbspSpace(number_format($productHeader[0]->total,2)) }}
@if(isset($businessEntityMasterData[0]->dl_no) ) D.L NO : {{$businessEntityMasterData[0]->dl_no}} @endif
@if(isset($businessEntityMasterData[0]->dl_no) ) GST NO : {{$businessEntityMasterData[0]->gsttin_no}} @endif

@if(isset($businessEntityMasterData[0]->name) ) 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))}}
@if($trnType == "I" || $trnType == "IR") Back {{-- Back --}} {{-- @if($productHeader[0]->bill_amendment > 0) Back @else Back @endif --}} @else @if($productHeader[0]->ph_is_consignment_dc == "Y") Back @else Back @endif @endif
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection