| @lang('sale.product') | @lang('re_order.current_stock') | @foreach ($locations_for_table_headers as $business_location) @if ($is_admin) @if ($stock_re_order->location_from != $business_location->id){{ $business_location->name }} @endif | @else{{ $business_location->location->name }} | @endif @endforeach# | |
|---|---|---|---|---|---|
|
{{ $product->product_name }}
({{ $product->sub_sku }})
Re-order level: {{ $main_product->product_re_order_level }} {{ $product->unit }} |
{{ number_format($av_qty->qty_available - $total_re_order_qty, 2) }} {{ $product->unit }} | @php $StockReOrderProducts = StockReOrderProducts::where( 'stock_re_order_products.re_order_id', $stock_re_order->id, ) ->where( 'stock_re_order_products.variation_id', $product->variation_id, ) ->join( 'business_locations', 'stock_re_order_products.location_id', '=', 'business_locations.id', ) ->orderBy('stock_re_order_products.id', 'ASC') ->get(); @endphp @foreach ($StockReOrderProducts as $product_location)
Re-order level: @if (!empty($product_has_location->product_re_order_level)) {{ $product_has_location->product_re_order_level }} @endif {{ $product->unit }} Max-order level: @if (!empty($product_has_location->product_max_order_level)) {{ $product_has_location->product_max_order_level }} @endif {{ $product->unit }} @php $requirement = 0; if ($product_re_order_level > $qty_available) { $requirement = $product_re_order_level - $qty_available - $product_location->re_order_quantity; } @endphp Requirement: {{ number_format($requirement, 2) }} {{ $product->unit }} |
@php
// $maximum_release = 0;
// $maximum_release =
// $product->qty_available - $main_product->product_re_order_level;
$total_reorder_quantity = StockReOrderProducts::where(
'stock_re_order_products.re_order_id',
$stock_re_order->id,
)
->where(
'stock_re_order_products.variation_id',
$product->variation_id,
)
->sum('re_order_quantity');
@endphp
@endforeach
{{-- --}} |