@extends('Reports.template') @section('title') Store Product Stock Statement @endsection @section('ExternalCss') @parent @endsection @section('Content')
@php $currentTime = \Carbon\Carbon::now(); $priceHeader = 'Unit Price'; $stockTitle = $productstock == 'All' ? Config::get('store_constants.reports.STORE_STOCK_STATEMENT') : Config::get('store_constants.reports.STORE_NEGATIVE_STOCK_STATEMENT'); if($productRequestedBy == "Y"){ $stockTitle .= ' -- Requested By '; } if ($priceType == 'W') { $stockTitle .= ' (With GST)'; } elseif ($priceType == 'WO') { $stockTitle .= ' (Without GST)'; } else { $stockTitle .= ' (MRP)'; $priceHeader = 'Unit MRP'; } @endphp @if($productRequestedBy == "Y") @else @endif @if($priceType != 'MRP') @else @endif @php $sr = 1; $tempProductName = ''; $tempMfg = ''; $tempCat = ''; $negativeBold = ''; $totalUnitPrice = 0; $totalPurQty = 0; $totalPurAmt = 0; $totalSaleQty = 0; $totalSaleAmt = 0; $totalStockQty = 0; $totalStocAmt = 0; $productWiseTotalStockQty = 0; $productWiseTotalStockAmt = 0; $reorder_count; @endphp @foreach ($stockData as $key => $stock) @if ($stock->current_stock_qty != '0') @php if ($stock->current_stock_qty < '0') { $negativeBold = 'td bold alignTop borderTopBottom txtRight'; } else { $negativeBold = 'td notBold alignTop borderTopBottom txtRight'; } $productRequestedByUser = $stock->product_requested_by; if ($stock->product_name != $tempProductName) { $reorder_count = 1; $srClass = 'td notBold alignTop borderTop txtRight'; $productNameClass = 'td notBold alignTop borderTop'; $srValue = $sr++; $productNameValue = $stock->product_name; $mfgClass = 'td notBold alignTop borderTop'; $mfgValue = $stock->manufacturer_code; $catClass = 'td notBold alignTop borderTop'; $catValue = $stock->category_abbrev; $productId = $stock->product_id; } else { $srClass = 'td borderNone'; $productNameClass = 'td borderNone'; $srValue = ''; $productNameValue = ''; $productId = ''; $productRequestedByUser = ''; if ($stock->manufacturer_code != $tempMfg) { $mfgClass = 'td notBold alignTop borderTop'; $mfgValue = $stock->manufacturer_code; } else { $mfgClass = 'td borderNone'; $mfgValue = ''; } if ($stock->category_abbrev != $tempCat) { $catClass = 'td notBold alignTop borderTop'; $catValue = $stock->category_abbrev; } else { $catClass = 'td borderNone'; $catValue = ''; } } $cumPurchaseQty = 0; $cumSaleQty = 0; $currentStockQty = 0; $price = 0; $cumPurchaseAmt = 0; $cumSaleAmt = 0; $currentStockAmt = 0; $cumPurchaseQty = $stock->cum_purchase_qty; $cumSaleQty = $stock->cum_sale_qty; $currentStockQty = $stock->current_stock_qty; if ($priceType == 'W') { $price = $stock->price_per_unit; } elseif ($priceType == 'WO') { $price = $stock->price_per_unit_wo_gst; } else { $price = $stock->mrp_per_unit; } $cumPurchaseAmt = $price * $cumPurchaseQty; $cumSaleAmt = $price * $cumSaleQty; $currentStockAmt = $price * $currentStockQty; @endphp @if ($stock->product_name != $tempProductName && $tempProductName != '') @php $productWiseTotalStockAmt = 0; $productWiseTotalStockQty = 0; @endphp @endif @if($productRequestedBy == "Y") @else @endif @if($priceType != 'MRP') @else @endif @if($reorder_count > 0) @php $reorder_count=0; @endphp @else @endif @php $totalUnitPrice += $price; $totalPurQty += $cumPurchaseQty; $totalPurAmt += $cumPurchaseAmt; $totalSaleQty += $cumSaleQty; $totalSaleAmt += $cumSaleAmt; $totalStockQty += $currentStockQty; $totalStocAmt += $currentStockAmt; $productWiseTotalStockQty += $currentStockQty; $productWiseTotalStockAmt += $currentStockAmt; $tempProductName = $stock->product_name; $tempMfg = $stock->manufacturer_code; $tempCat = $stock->category_abbrev; @endphp @endif @endforeach
@if ($businessEntityMasterData[0]->logo != null) Pharmacy Logo @endif
{{ $businessEntityMasterData[0]->name }}
{{ $businessEntityMasterData[0]->add1 . ' ' . $businessEntityMasterData[0]->add2 . ' ' . $businessEntityMasterData[0]->city . ' : ' . $businessEntityMasterData[0]->pincode }}
{{ 'Phone : ' . $businessEntityMasterData[0]->tel1 }}
{{ $stockTitle }} Store : {{ $storeName }} As on: {{ $currentTime->format('d/m/Y H:i:s ') }}
SrReq ByPro. ID  Product Name Mfg Cat Bin Location Batch Exp   UOM  MRP  {{ $priceHeader }} Stock Qty Stock Amt Re-Order Qty
Total {{ $productWiseTotalStockQty }} {{ \Helper::customAmountFormat4($productWiseTotalStockAmt) }}
{{ $srValue }}{{ $productRequestedByUser }}{{ $productId }} {{ $productNameValue }} {{ $mfgValue }} {{ $catValue }} {{ \Helper::zeroValueToNbspSpace($stock->product_bin_location) }} {{ strtoupper($stock->batch_no) }} {{ \Helper::getMonthYearFromDate($stock->batch_exp) }}  {{ $stock->unit_abbrev }}{{ \Helper::customAmountFormat4($stock->mrp_per_unit) }}{{ \Helper::customAmountFormat4($price) }} {{ \Helper::zeroValueToNbspSpace($currentStockQty) }} {{ \Helper::customAmountFormat4($currentStockAmt) }} {{ \Helper::zeroValueToNbspSpace($stock->product_reorder_level) }}
Total {{ $productWiseTotalStockQty }} {{ \Helper::customAmountFormat4($productWiseTotalStockAmt) }}
{{ 'Total : ' }} {{ \Helper::customAmountFormat4($totalStocAmt) }}
{{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }}
@php if($productRequestedBy == "Y") $url = url('StoreItem/storeStockStatementReqByInput'); else $url = url('StoreItem/storeStockStatementInput'); @endphp
Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection