@extends('Reports.template') @section('title') @if($reportType == "reorder") @php $reportTitle = "Medicine Reorder Report (Product Reorder Value Wise)"; @endphp @else @php $reportTitle = "Medicine Reorder Report (Product Consumption Wise)"; @endphp @endif {{$reportTitle}} @endsection @section('ExternalCss') @parent @endsection @section('Content')
@php $currentTime = \Carbon\Carbon::now(); @endphp @if($reportType == "reorder") @else @endif @php $sr = 1; $qty = 0; $avgDay = 0; $addReq = 0; $productArray = array(); $reorderQtyArray = array(); @endphp @foreach($medicineReorderData as $product) @foreach($stockReorder as $stock) @if($product->product_id == $stock->product_id) @if($reportType != 'reorder') @php $qty = $product->quantity; $avgDay = round($product->quantity/$day,2); $qtyForDays = '-'; if ($avgDay > 0) { if ($stock->current_stock_qty <= 0) { $qtyForDays = 0; } else { $qtyForDays = round($stock->current_stock_qty/$avgDay); } } $addReq = $product->quantity - $stock->current_stock_qty; if ($addReq > 0) { array_push($productArray, $product->product_id); array_push($reorderQtyArray, $addReq); } @endphp @if($addReq < 0) @php $addReq= '-'; @endphp @endif @else @php $qty = ''; $avgDay = ''; $qtyForDays = ''; $addReq = ''; @endphp @endif @if($reportType != 'reorder' && $reportListType != "A") @if($addReq > 0) @if(isset($ratemrp[$product->product_id]["trn_type"])) @else @endif @endif @else @if(isset($ratemrp[$product->product_id]["trn_type"])) @else @endif @endif @endif @endforeach @endforeach @php $productArray = array_unique($productArray); $productIds = implode(',', $productArray); $reorderQtys = implode(',', $reorderQtyArray); @endphp
Pharmacy Logologo )}}"/>
{{ $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->format('d/m/Y H:i:s ')}} Period Of {{$day}} Days From : {{\Helper::getDisplayDate($fromDate)}} To {{\Helper::getDisplayDate($toDate)}}
Sr No Item Name Generic Drug Pack Last Supp Name Last Voucher No Last MRP Last Rate Curr. Stock Reorder Value Total Sale Avg/Day Sale Stock for # Days Reorder Qty
{{$sr++}} {{$product->product_name}} {{$product->generic_drug_name}} {{"1x".$product->conversion_factor}}{{$ratemrp[$product->product_id]["supplierName"]}} {{$ratemrp[$product->product_id]["trn_type"]."/".$ratemrp[$product->product_id]["trn_fyear"]."/".$ratemrp[$product->product_id]["trn_id"]}} {{\Helper::customAmountFormat($ratemrp[$product->product_id]["mrp"])}} {{\Helper::customAmountFormat4($ratemrp[$product->product_id]["price"])}} {{\Helper::customAmountFormat(0)}} {{\Helper::customAmountFormat(0)}}{{$stock->current_stock_qty}} {{$stock->product_reorder_level}} {{$qty}} {{$avgDay}} {{$qtyForDays}} {{$addReq}}
{{$sr++}} {{$product->product_name}} {{$product->generic_drug_name}} {{"1x".$product->conversion_factor}}{{$ratemrp[$product->product_id]["supplierName"]}} {{$ratemrp[$product->product_id]["trn_type"]."/".$ratemrp[$product->product_id]["trn_fyear"]."/".$ratemrp[$product->product_id]["trn_id"]}} {{\Helper::customAmountFormat($ratemrp[$product->product_id]["mrp"])}} {{\Helper::customAmountFormat4($ratemrp[$product->product_id]["price"])}} {{\Helper::customAmountFormat(0)}} {{\Helper::customAmountFormat(0)}}{{$stock->current_stock_qty}} {{$stock->product_reorder_level}} {{$qty}} {{$avgDay}} {{$qtyForDays}} {{$addReq}}
{{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}
@if($trnType == "P") Back @else Back @endif
@endsection @section('BootstrapModals') @include('Components/Bootstrap Modals/processing_modal') @endsection @section('ExternalJs') @endsection