@extends('Reports.template') @php $reportTitle = 'GST Credit Note Register'; @endphp @section('title') {{ $reportTitle }} @endsection @section('ExternalCss') @parent @endsection @section('Content') @if ($reportType === 'B') @endif @php $oldPhTrnType = ''; $oldPhTrnId = ''; $createdBy = ''; $headerSr = 1; $transactionSr = 1; $datetime = 0; $totalQty = 0; $totalAmount = 0; $totalRevisedAmount=0; $totalOriginalQty=0; $grosstotalQty=0; $totalTaxable=0; $totalSGST=0; $totalCGST=0; $Original_Amt=0; $grossphNetTaxableAmt =0; $grossphCgstAmt =0; $grossphSgstAmt =0; $grossphTotal =0; $bill=0; @endphp @foreach ($productTransactionData as $key => $productTransaction) @if ($productTransaction->ph_trn_id != $oldPhTrnId || $productTransaction->ph_trn_type != $oldPhTrnType) @php $bill++; @endphp @if ($totalQty != 0) @if ($reportType === 'B') @endif @endif @php $transactionSr = 1; $totalQty = 0; $datetime = 0; $phGrossTotal = $productTransaction->ph_gross_total; $phNetTaxableAmt = $productTransaction->ph_net_taxable_amt; $phCgstAmt = $productTransaction->ph_cgst_amt; $phSgstAmt = $productTransaction->ph_sgst_amt; $phTotal = $productTransaction->ph_total; $refTrnNo = 'I' . $productTransaction->ref_trn_id; @endphp @endif @if ($reportType === 'B') @php $Original_Amt=\app\Http\Controllers\GSTCreditNoteController::get_ref_trn_data($productTransaction->trn_type, $productTransaction->ph_trn_id, $productTransaction->trn_sr_no); @endphp @endif @php $createdBy = strtoupper($productTransaction->ph_created_by); $totalQty += $productTransaction->quantity; $grosstotalQty += $productTransaction->quantity; $totalAmount += $productTransaction->total; $totalRevisedAmount += $Original_Amt-$productTransaction->total; $totalOriginalQty += $Original_Amt; $totalTaxable+=$productTransaction->taxable_amt; $totalCGST+=$productTransaction->cgst_value; $totalSGST+=$productTransaction->sgst_value; $datetime = $productTransaction->created_date; $oldPhTrnType = $productTransaction->ph_trn_type; $oldPhTrnId = $productTransaction->ph_trn_id; $grossphNetTaxableAmt += $productTransaction->ph_net_taxable_amt; $grossphCgstAmt += $productTransaction->ph_cgst_amt; $grossphSgstAmt += $productTransaction->ph_sgst_amt; $grossphTotal += $productTransaction->ph_total; @endphp @endforeach @if ($reportType === 'B') @endif @php $currentTime = \Carbon\Carbon::now(); @endphp @if ($reportType === 'B') @else @endif
@if ($businessEntityMasterData[0]->logo != null) Pharmacy Logo @endif
{{ $businessEntityMasterData[0]->name }}
{{ $businessEntityMasterData[0]->add1 . ' ' . $businessEntityMasterData[0]->add2 . ' ' . $businessEntityMasterData[0]->city . ' : ' . $businessEntityMasterData[0]->pincode }}
{{ 'Phone : ' . $businessEntityMasterData[0]->tel1 }}
{{ $reportTitle . ' ' }} Period : {{ \Helper::getDisplayDate($fromDate) }} TO {{ \Helper::getDisplayDate($toDate) }}
Bill No Bill Date Ref No. Net Amount Net Taxable CGST SGST
Sr  Name HSN Code   Batch Exp Category S Unit P Size Qty GST% Original Amt Revised Amt Difference Amt Taxable CGST SGST
Total Qty : {{ \Helper::zeroValueToNbspSpace($totalQty) }} {{ 'Created By : ' }} @if ($createdBy) {{ $createdBy . ' ' . Carbon\Carbon::parse($datetime)->format('d-m-Y h:i:s') }} @endif
{{ $productTransaction->trn_type."/".$productTransaction->trn_fyear."/" . $productTransaction->ph_trn_id }} {{ \Helper::getDisplayDate($productTransaction->ph_trn_date) }} {{ \Helper::zeroValueToNbspSpace($refTrnNo) }} {{ \Helper::customAmountFormat($phTotal) }} {{ \Helper::customAmountFormat($phNetTaxableAmt) }} {{ \Helper::customAmountFormat($phCgstAmt) }} {{ \Helper::customAmountFormat($phSgstAmt) }}
{{ $transactionSr++ }} {{ \Helper::zeroValueToNbspSpace($productTransaction->product_name) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->product_hsn_code) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->batch_no) }} {{ \Helper::getMonthYearFromDate($productTransaction->batch_exp) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->category_abbrev) }} {{ \Helper::zeroValueToDash($productTransaction->suom) }} {{ \Helper::zeroValueToDash($productTransaction->conversion_factor) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->quantity) }} {{ \Helper::zeroValueToNbspSpace(floatval($productTransaction->sgst_percentage) + floatval($productTransaction->cgst_percentage) + floatval($productTransaction->igst_percentage)) }} {{ number_format($Original_Amt,2) }} {{ number_format($Original_Amt-$productTransaction->total,2) }} {{ \Helper::customAmountFormat($productTransaction->total) }} {{ \Helper::customAmountFormat($productTransaction->taxable_amt) }} {{ \Helper::customAmountFormat( floatval($productTransaction->cgst_value)) }} {{ \Helper::customAmountFormat(floatval($productTransaction->sgst_value)) }}
Total Qty : {{ \Helper::zeroValueToNbspSpace($totalQty) }} {{ 'Created By : ' }} @if ($createdBy) {{ $createdBy . ' ' . Carbon\Carbon::parse($datetime)->format('d-m-Y h:i:s') }} @endif
Total Credit Note : {{ \Helper::zeroValueToNbspSpace($bill) }} {{ \Helper::customAmountFormat($totalOriginalQty) }} {{ \Helper::customAmountFormat($totalRevisedAmount) }} {{ \Helper::customAmountFormat($totalAmount) }} {{ \Helper::customAmountFormat($totalTaxable) }} {{ \Helper::customAmountFormat($totalCGST) }} {{ \Helper::customAmountFormat($totalSGST) }}
Total Credit Note : {{ \Helper::customAmountFormat($grossphTotal) }} {{ \Helper::customAmountFormat($grossphNetTaxableAmt) }} {{ \Helper::customAmountFormat($grossphCgstAmt) }} {{ \Helper::customAmountFormat($grossphSgstAmt) }}
{{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }}
Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection