@extends('Reports.template') @section('title') @php $reportTitle = "Sales Summary - Product Wise"; @endphp {{__($reportTitle)}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @if($reportType == "S") @php $reportTypeDisplay = "(Summary)"; @endphp @else @php $reportTypeDisplay = "(With Transactions)"; @endphp @endif @if($reportType != 'S') @else @endif @php $srheader = 1; $sr = 1 ; $totalIssueQty = 0; $totalIssueAmount = 0; $totalAmount = 0; $productId = ''; $patOrCustName = ''; $finalAmount = 0; @endphp @foreach ($productData as $product) @php $finalAmount += $product->total; @endphp @if($product->product_id != $productId && $product->quantity != 0) @if($srheader != 1) @if($reportType != 'S') @if($totalIssueQty != 0) @else @endif @endif @endif @endif @php $totalIssueQty = 0; $totalIssueAmount = 0; $totalSaleProduct = 0; $productId = $product->product_id; @endphp @if($reportType != 'S') @else @if($product->quantity != 0) @else @endif @endif @if($reportType != 'S') @foreach ($productTransactionData as $transaction) @if($transaction->product_id == $product->product_id) @php $patOrCustName = ($transaction->patient_name != '') ? $transaction->patient_name : '*'.$transaction->ph_cust_name ; @endphp @if($transaction->calc_quantity != 0) @else @endif @php $totalIssueQty += $transaction->calc_quantity; $totalIssueAmount += $transaction->sold_amt; $productId = $product->product_id; @endphp @endif @endforeach @endif @endforeach @if($reportType != 'S') @if($totalIssueQty != 0) @else @endif @else @endif @php $currentTime = \Carbon\Carbon::now(); @endphp @if($reportType != 'S') @else @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).__($reportTypeDisplay)}} {{__('Store')}} : {{$storeName}} {{__('Period')}} : {{\Helper::getDisplayDate($fromDate)}} {{__('TO')}} {{\Helper::getDisplayDate($toDate)}}
{{__('Sr No')}} {{__('Product Name')}} {{__('Generic Drug Name')}} {{__('Category')}}
 {{__('Trn No')}}  {{__('Trn Date')}}  {{__('Patient / Customer Name')}}  {{__('Qty')}}  {{__('MRP')}}  {{__('Amount')}}
{{__('Sr No')}} {{__('Product Name')}} {{__('Generic Drug Name')}} {{__('Category')}} {{__('Total Qty')}} {{__('Total MRP')}} {{__('Total Amount')}}
{{__('Total')}} {{$totalIssueQty}}{{\Helper::customAmountFormat(round($totalIssueAmount/$totalIssueQty,2))}}{{\Helper::customAmountFormat(0)}}{{\Helper::customAmountFormat($totalIssueAmount)}}
{{$srheader++}} {{$product->product_name}} {{$product->generic_drug_name}} {{$product->category_abbrev }}
{{$srheader++}} {{$product->product_name}} {{$product->generic_drug_name}} {{$product->category_abbrev }} {{$product->quantity}}{{ \Helper::customAmountFormat(round($product->total/$product->quantity,2)) }}{{ \Helper::customAmountFormat(0) }}{{ \Helper::customAmountFormat($product->total) }}
 {{ $transaction->trn_type."/".$transaction->trn_fyear."/".$transaction->trn_id }}  {{\Helper::getDisplayDate($transaction->trn_date)}}  {{$patOrCustName}}  {{$transaction->calc_quantity}} {{ \Helper::customAmountFormat(round($transaction->sold_amt/$transaction->calc_quantity,2))}} {{ \Helper::customAmountFormat(0)}} {{ \Helper::customAmountFormat($transaction->sold_amt)}}
{{__('Total')}} {{$totalIssueQty}}{{\Helper::customAmountFormat(round($totalIssueAmount/$totalIssueQty,2))}}{{\Helper::customAmountFormat(0)}}{{\Helper::customAmountFormat($totalIssueAmount)}}
{{__('Grand Total')}} {{\Helper::customAmountFormat($finalAmount)}}
{{__('Grand Total')}} {{\Helper::customAmountFormat($finalAmount)}}
{{__(Config::get('constants.asterisk.WALK_CUST'))}} {{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}{{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}
{{__('Back')}}
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection