@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 = 0; @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; $generic_drug_name = $stock->generic_drug_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 = ''; $generic_drug_name=''; $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 ') }}
{{__('Sr')}}{{__('Req By')}}{{__('Pro. ID')}}  {{__('Product Name')}}  {{__('Generic Drug 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 }} {{ $generic_drug_name }} {{ $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