@extends('Reports.template') @section('title') @if($rateType == "W") @php $reportTitle = "Gross Profit & Sales Margin Summary - With GST"; @endphp @else @php $reportTitle = "Gross Profit & Sales Margin Summary - Without GST"; @endphp @endif {{$reportTitle}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @php $currentTime = \Carbon\Carbon::now(); @endphp @php $sr = 1; $totalSaleAmt = 0; $totalPurchaseAmt =0; $totalProfitAmt =0; $totalQty =0; $month; @endphp @foreach ($productProfit as $key =>$summary) @php $profitAmt =$summary->sale_amt-$summary->pur_amt; $month = DateTime::createFromFormat('!m', $summary->cmonth); $amountPer = 0; if($summary->pur_amt!=0) $amountPer =($profitAmt/$summary->pur_amt)*100; if($summary->sale_amt!=0) $marginPer =($profitAmt/$summary->sale_amt)*100; @endphp @php $totalSaleAmt +=$summary->sale_amt; $totalPurchaseAmt +=$summary->pur_amt; $totalProfitAmt +=$profitAmt; $totalQty +=$summary->quantity; @endphp @endforeach @if($totalSaleAmt!=0) @endif @if($totalPurchaseAmt!=0) @endif
@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}} As on : {{$currentTime}}
Period : {{\Helper::getDisplayDate($fromDate)}} TO {{\Helper::getDisplayDate($toDate)}}
Sr No.   Month Sale Qty Sale Amt Purchase Amt Gross Profit Amt Gross Sales Margin % Gross Profit %
(A) (B) (C = A - B) (D = (C / A) * 100) (E = (C / B) * 100)
{{$sr++}}   {{$month->format('F')}} {{$summary->quantity}} {{\Helper::customAmountFormat($summary->sale_amt)}} {{\Helper::customAmountFormat($summary->pur_amt)}} {{\Helper::customAmountFormat($profitAmt)}} {{\Helper::customAmountFormat($marginPer).'%'}} {{\Helper::customAmountFormat($amountPer).'%'}}
Total {{\Helper::customAmountFormat($totalSaleAmt)}} {{\Helper::customAmountFormat($totalPurchaseAmt)}} {{\Helper::customAmountFormat($totalProfitAmt)}}{{\Helper::customAmountFormat(($totalProfitAmt/$totalSaleAmt)*100).'%'}}{{\Helper::customAmountFormat(($totalProfitAmt/$totalPurchaseAmt)*100).'%'}}
{{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}
Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection