@extends('Reports.template') @section('title') @if($rateType == "W") @php $reportTitle = "Gross Profit & Sales Margin Details - With GST"; @endphp @else @php $reportTitle = "Gross Profit & Sales Margin Details - 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; $negativeBold =0; @endphp @foreach ($productProfit as $key =>$profit) @php $profitAmt = $profit->sale_amt-$profit->pur_amt; if($profit->pur_amt!=0) $ProfitPer = ($profitAmt/$profit->pur_amt)*100; if($profit->sale_amt!=0) $MarginPer = ($profitAmt/$profit->sale_amt)*100; if($profitAmt < '0'){ $negativeBold = 'td bold alignTop borderTopBottom txtRight'; }else{ $negativeBold = 'td notBold alignTop borderTopBottom txtRight'; } if($ProfitPer < '0'){ $negativeBoldPer = 'td bold alignTop borderTopBottom txtRight'; }else{ $negativeBoldPer = 'td notBold alignTop borderTopBottom txtRight'; } if($MarginPer < '0'){ $negativeBoldMargin = 'td bold alignTop borderTopBottom txtRight'; }else{ $negativeBoldMargin = 'td notBold alignTop borderTopBottom txtRight'; } @endphp @php $totalSaleAmt +=$profit->sale_amt; $totalPurchaseAmt +=$profit->pur_amt; $totalProfitAmt +=$profitAmt; @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 . " (Category : " . $categoryName . ")"}} Store : {{$storeName}} As on : {{$currentTime}}
Period : {{\Helper::getDisplayDate($fromDate)}} TO {{\Helper::getDisplayDate($toDate)}}
Sr No.  Product Name Sale Qty SUOM 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++}}  {{$profit->product_name}} {{$profit->quantity}} {{$profit->stock_unit}} {{\Helper::customAmountFormat($profit->sale_amt)}} {{\Helper::customAmountFormat($profit->pur_amt)}} {{\Helper::customAmountFormat($profitAmt)}} {{\Helper::customAmountFormat($MarginPer).'%'}} {{\Helper::customAmountFormat($ProfitPer).'%'}}
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