@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 $checkDiff = $stock->product_reorder_level - $stock->current_stock_qty; if($checkDiff > 0){ array_push($productArray, $product->product_id); array_push($reorderQtyArray, $stock->product_reorder_level); $addReq = $stock->product_reorder_level; } else { $addReq = ''; } $qty = ''; $avgDay = ''; $qtyForDays = ''; @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