@extends('Reports.template') @section('title') @php $reportTitle = "Purchase Summary With GST Details"; @endphp {{$reportTitle}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @if($reporttype == "detail") @php $currentTime = \Carbon\Carbon::now(); @endphp @php $sr = 1; $tempSupplierName = ''; $supplier_old= ''; $totalNetAmt = 0; $totalNetCgst = 0; $totalNetSgst = 0; $totalNetIgst = 0; $totalsupplier = 0; $totalTaxableReturn = 0; $totalReturnCgst = 0; $totalReturnSgst = 0; $totalReturnIgst = 0; $totalReturnTaxablePlsTax = 0; $totalReturnSchAmount = 0; $totalReturnTcsAmt = 0; $totalReturnROundOff = 0; $totalReturnAmt = 0; $totalTaxableAmt = 0; $totalCgstAmt = 0; $totalSgstAmt = 0; $totalIgstAmt = 0; $totalTaxablePlsTax = 0; $totalSchAmount = 0; $totalTcsAmount = 0; $totalROundOffAmt = 0; $totalPurchase = 0; $netTaxableAmt = 0; $netCgstAmt = 0; $netSgstAmt = 0; $netIgstAmt = 0; $netTaxablePlsTax = 0; $netSchAmount = 0; $netTcsAmount = 0; $netRoundOffAmt = 0; $netPurchaseAmt = 0; $taxableAmt = 0; $cgstAmt = 0; $sgstAmt = 0; $igstAmt = 0; $strike = 'noStrike'; $gstno =''; @endphp @foreach ($supplierwise as $key =>$stock) @if($stock->supplier_name != $supplier_old) @if($totalsupplier != 0) @endif @php $supplier_old = ''; $totalNetAmt = 0; $totalNetSgst = 0; $totalNetCgst = 0; $totalNetIgst = 0; $totalsupplier = 0; $totalNetTaxablePlsTax = 0; $totalNetSchAmount = 0; $totalNetTcsAmount = 0; $totalNetRoundOffAmt = 0; $strike = 'noStrike'; $gstno =''; @endphp @endif @if($stock->supplier_name != $tempSupplierName) @else @endif @if(($stock->supplier_name != $tempSupplierName)||($gstno != $stock->supplier_gstin_no)) @else @endif @if($stock->trn_type == 'PR') @php $taxableAmt = $stock->net_taxable_amt * (-1); $cgstAmt = $stock->cgst_amt * (-1); $sgstAmt = $stock->sgst_amt * (-1); $igstAmt = $stock->igst_amt * (-1); $taxablePlsTax = $stock->ph_invoice_amt * (-1); $schAmount = $stock->ph_sch_amount * (-1); $tcsAmount = $stock->ph_tcs_amount * (-1); $roundOffAmt = $stock->ph_round_off * (-1); $netAmount = $stock->ph_total * (-1); $totalNetAmt -= $stock->net_taxable_amt; $totalNetCgst -= $stock->cgst_amt; $totalNetSgst -= $stock->sgst_amt; $totalNetIgst -= $stock->igst_amt; $totalNetTaxablePlsTax -= $stock->ph_invoice_amt; $totalNetSchAmount -= $stock->ph_sch_amount; $totalNetTcsAmount -= $stock->ph_tcs_amount; $totalNetRoundOffAmt -= $stock->ph_round_off; $totalsupplier -= $stock->ph_total; $totalTaxableReturn += $stock->net_taxable_amt; $totalReturnCgst += $stock->cgst_amt; $totalReturnSgst += $stock->sgst_amt; $totalReturnIgst += $stock->igst_amt; $totalReturnTaxablePlsTax += $stock->ph_invoice_amt; $totalReturnSchAmount += $stock->ph_sch_amount; $totalReturnTcsAmt += $stock->ph_tcs_amount; $totalReturnROundOff += $stock->ph_round_off; $totalReturnAmt += $stock->ph_total; @endphp @else @php $taxableAmt = $stock->net_taxable_amt; $cgstAmt = $stock->cgst_amt; $sgstAmt = $stock->sgst_amt; $igstAmt = $stock->igst_amt; $taxablePlsTax = $stock->ph_invoice_amt; $schAmount = $stock->ph_sch_amount; $tcsAmount = $stock->ph_tcs_amount; $roundOffAmt = $stock->ph_round_off; $netAmount = $stock->ph_total; $totalNetAmt += $stock->net_taxable_amt; $totalNetCgst += $stock->cgst_amt; $totalNetSgst += $stock->sgst_amt; $totalNetIgst += $stock->igst_amt; $totalNetTaxablePlsTax += $taxablePlsTax; $totalNetSchAmount += $schAmount; $totalNetTcsAmount += $tcsAmount; $totalNetRoundOffAmt += $roundOffAmt; $totalsupplier += $netAmount; $totalTaxableAmt += $stock->net_taxable_amt; $totalCgstAmt += $stock->cgst_amt; $totalSgstAmt += $stock->sgst_amt; $totalIgstAmt += $stock->igst_amt; $totalTaxablePlsTax += $taxablePlsTax; $totalSchAmount += $schAmount; $totalTcsAmount += $tcsAmount; $totalROundOffAmt += $roundOffAmt; $totalPurchase += $stock->ph_total; @endphp @endif @php $tempSupplierName = $stock->supplier_name; $supplier_old = $stock->supplier_name; $gstno = $stock->supplier_gstin_no; @endphp @endforeach @php $netTaxableAmt = $totalTaxableAmt - $totalTaxableReturn; $netCgstAmt = $totalCgstAmt - $totalReturnCgst; $netSgstAmt = $totalSgstAmt - $totalReturnSgst; $netIgstAmt = $totalIgstAmt - $totalReturnIgst; $netTaxablePlsTax = $totalTaxablePlsTax - $totalReturnTaxablePlsTax; $netSchAmount = $totalSchAmount - $totalReturnSchAmount; $netTcsAmount = $totalTcsAmount - $totalReturnTcsAmt; $netRoundOffAmt = $totalROundOffAmt - $totalReturnROundOff; $netPurchaseAmt = $totalPurchase - $totalReturnAmt; @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)}}
Sr No. {{Config::get('constants.reports.SUPPLIER_NAME')}} GST No {{Config::get('constants.reports.TRN_NO')}} {{Config::get('constants.reports.TRN_DATE')}} {{Config::get('constants.reports.SUPPLIER_BILL_NO')}} {{Config::get('constants.reports.SUPPLIER_BILL_DATE')}} Taxable Amt CGST Amt SGST Amt IGST Amt Taxable + Tax Sch Amt TCS Amt R. off Net Amt
Total {{\Helper::customAmountFormat($totalNetAmt)}} {{\Helper::customAmountFormat($totalNetCgst)}} {{\Helper::customAmountFormat($totalNetSgst)}} {{\Helper::customAmountFormat($totalNetIgst)}} {{\Helper::customAmountFormat($totalNetTaxablePlsTax)}} {{\Helper::customAmountFormat($totalNetSchAmount)}} {{\Helper::customAmountFormat($totalNetTcsAmount)}} {{\Helper::customAmountFormat($totalNetRoundOffAmt)}} {{\Helper::customAmountFormat($totalsupplier)}}
{{$sr++}} {{$stock->supplier_name}} {{$stock->supplier_gstin_no}}{{$stock->trn_type."/".$stock->trn_fyear."/".$stock->trn_id}} {{\Helper::getDisplayDate($stock->trn_date)}} {{($stock->ph_purchase_bill_no)}} {{\Helper::getDisplayDate($stock->ph_purchase_bill_date)}} {{\Helper::customAmountFormat($taxableAmt)}} {{\Helper::customAmountFormat($cgstAmt)}} {{\Helper::customAmountFormat($sgstAmt)}} {{\Helper::customAmountFormat($igstAmt)}} {{\Helper::customAmountFormat($taxablePlsTax)}} {{\Helper::customAmountFormat($schAmount)}} {{\Helper::customAmountFormat($tcsAmount)}} {{\Helper::customAmountFormat($roundOffAmt)}} {{\Helper::customAmountFormat($netAmount)}}
Total {{\Helper::customAmountFormat($totalNetAmt)}} {{\Helper::customAmountFormat($totalNetCgst)}} {{\Helper::customAmountFormat($totalNetSgst)}} {{\Helper::customAmountFormat($totalNetIgst)}} {{ \Helper::customAmountFormat($totalNetTaxablePlsTax ?? '')}} {{ \Helper::customAmountFormat($totalNetSchAmount ?? '')}} {{ \Helper::customAmountFormat($totalNetTcsAmount ?? '')}} {{ \Helper::customAmountFormat($totalNetRoundOffAmt ?? '')}} {{ \Helper::customAmountFormat($totalsupplier ?? '')}}
Total Purchase {{ \Helper::customAmountFormat($totalTaxableAmt)}} {{ \Helper::customAmountFormat($totalCgstAmt)}} {{ \Helper::customAmountFormat($totalSgstAmt)}} {{ \Helper::customAmountFormat($totalIgstAmt)}} {{ \Helper::customAmountFormat($totalTaxablePlsTax)}} {{ \Helper::customAmountFormat($totalSchAmount)}} {{ \Helper::customAmountFormat($totalTcsAmount)}} {{ \Helper::customAmountFormat($totalROundOffAmt)}} {{ \Helper::customAmountFormat($totalPurchase)}}
Total Purchase Return {{ \Helper::customAmountFormat($totalTaxableReturn)}} {{ \Helper::customAmountFormat($totalReturnCgst)}} {{ \Helper::customAmountFormat($totalReturnSgst)}} {{ \Helper::customAmountFormat($totalReturnIgst)}} {{ \Helper::customAmountFormat($totalReturnTaxablePlsTax)}} {{ \Helper::customAmountFormat($totalReturnSchAmount)}} {{ \Helper::customAmountFormat($totalReturnTcsAmt)}} {{ \Helper::customAmountFormat($totalReturnROundOff)}} {{ \Helper::customAmountFormat($totalReturnAmt)}}
Net Purchase {{ \Helper::customAmountFormat($netTaxableAmt)}} {{ \Helper::customAmountFormat($netCgstAmt)}} {{ \Helper::customAmountFormat($netSgstAmt)}} {{ \Helper::customAmountFormat($netIgstAmt)}} {{ \Helper::customAmountFormat($netTaxablePlsTax)}} {{ \Helper::customAmountFormat($netSchAmount)}} {{ \Helper::customAmountFormat($netTcsAmount)}} {{ \Helper::customAmountFormat($netRoundOffAmt)}} {{ \Helper::customAmountFormat($netPurchaseAmt)}}
{{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}
@endif @if($reporttype == "summary") @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)}}
{{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}
@endif

GST Summary - Purchase

@php $sgstAmt = 0; $cgstAmt = 0; $netTaxableTotal = 0; $netSale = 0; $total = 0; @endphp @foreach ($OnlyPurchasegstSummary as $key => $gst) @if($gst->trn_type == "P") @php $gstRange = $gst->sgst_percentage + $gst->cgst_percentage+ $gst->igst_percentage;; $sgstAmt += $gst->sgst_amt; $cgstAmt += $gst->cgst_amt; $netTaxableTotal += $gst->net_taxable; $total = $gst->net_taxable + $gst->sgst_amt + $gst->cgst_amt; $netSale += $total; @endphp @endif @endforeach
Taxable CGST SGST IGST Purchase
% Amount % Amount % Amount Tax Amt % Amount Total Amount
{{$gstRange}} {{\Helper::customAmountFormat($gst->net_taxable)}} {{$gst->cgst_percentage}} {{\Helper::customAmountFormat($gst->cgst_amt)}} {{$gst->sgst_percentage}} {{\Helper::customAmountFormat($gst->sgst_amt)}} {{$gst->igst_net_taxable}} {{($gstRange)}} {{$gst->igst_amt}} {{\Helper::customAmountFormat($total)}}
Total {{\Helper::customAmountFormat($netTaxableTotal)}} {{\Helper::customAmountFormat($cgstAmt)}} {{\Helper::customAmountFormat($sgstAmt)}} {{\Helper::customAmountFormat($igstAmt ?? '')}} {{\Helper::customAmountFormat($netSale)}}

GST Summary - Purchase Return

@php $sgstAmt = 0; $cgstAmt = 0; $netTaxableTotal = 0; $netSale = 0; $total = 0; @endphp @foreach ($OnlyPurchaseReturngstSummary as $key => $gst) @if($gst->trn_type == "PR") @php $gstRange = $gst->sgst_percentage + $gst->cgst_percentage+ $gst->igst_percentage;; $sgstAmt += $gst->sgst_amt; $cgstAmt += $gst->cgst_amt; $netTaxableTotal += $gst->net_taxable; $total = $gst->net_taxable + $gst->sgst_amt + $gst->cgst_amt; $netSale += $total; @endphp @endif @endforeach
Taxable CGST SGST IGST Purchase
% Amount % Amount % Amount Tax Amt % Amount Total Amount
{{$gstRange}} {{\Helper::customAmountFormat($gst->net_taxable)}} {{$gst->cgst_percentage}} {{\Helper::customAmountFormat($gst->cgst_amt)}} {{$gst->sgst_percentage}} {{\Helper::customAmountFormat($gst->sgst_amt)}} {{$gst->igst_net_taxable}} {{($gstRange)}} {{$gst->igst_amt}} {{\Helper::customAmountFormat($total)}}
Total {{\Helper::customAmountFormat($netTaxableTotal)}} {{\Helper::customAmountFormat($cgstAmt)}} {{\Helper::customAmountFormat($sgstAmt)}} {{\Helper::customAmountFormat($igstAmt ?? '')}} {{\Helper::customAmountFormat($netSale)}}

GST Summary - Total

@php $sgstAmt =0; $cgstAmt =0; $igstAmt =0; $netTaxableTotal =0; $netIgstTaxableTotal = 0; $netpurchase =0; @endphp @foreach ($purchasegstSummary as $key =>$gst) @php $gstRange =$gst->sgst_percentage + $gst->cgst_percentage + $gst->igst_percentage; $sgstAmt+=$gst->sgst_amt; $cgstAmt+=$gst->cgst_amt; $igstAmt+=$gst->igst_amt; $netpurchase +=$gst->total; $netTaxableAmt = $gst->net_taxable - $gst->igst_net_taxable; $netTaxableTotal += $netTaxableAmt; $netIgstTaxableTotal += $gst->igst_net_taxable; @endphp @endforeach
Taxable CGST SGST IGST Purchase
% Amount % Amount % Amount Tax Amt % Amount Total Amount
{{$gstRange}} {{\Helper::customAmountFormat($netTaxableAmt)}} {{$gstRange/2}} {{\Helper::customAmountFormat($gst->cgst_amt)}} {{$gstRange/2}} {{\Helper::customAmountFormat($gst->sgst_amt)}} {{ \Helper::customAmountFormat($gst->igst_net_taxable) }} {{$gstRange}} {{\Helper::customAmountFormat($gst->igst_amt)}} {{\Helper::customAmountFormat($gst->total)}}
Total {{\Helper::customAmountFormat($netTaxableTotal)}} {{\Helper::customAmountFormat($cgstAmt)}} {{\Helper::customAmountFormat($sgstAmt)}} {{ \Helper::customAmountFormat($netIgstTaxableTotal) }} {{\Helper::customAmountFormat($igstAmt)}} {{\Helper::customAmountFormat($netpurchase)}}


Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection