@extends('Reports.template') @section('title') @php $reportTitle = __("Gross Profit & Sales Margin Details"); if($onlyForOp == "Y"){ $reportTitle .= __("For OP And Customer"); } if($rateType == "W"){ $reportTitle .= __("- With GST"); } else { $reportTitle .= __("- Without GST"); } @endphp {{__($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 ')}}
@php if($onlyForOp == "Y"){ $path = url('Item/profitReportInputOp'); } else { $path = url('Item/profitReportInput'); } @endphp {{__('Back')}}
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection