@php
use App\StockReOrderProduct;
use App\StockReOrderProducts;
use Illuminate\Support\Facades\DB;
@endphp
@lang('purchase.ref_no'): #{{ $stock_re_order->re_order_ref }}
@lang('lang_v1.location_from'): {{ $stock_re_order->name }}
@lang('messages.date'): {{ @format_date($stock_re_order->re_order_date) }}
{{--
--}}
@if ($view_type == 'product_wise')
@foreach ($re_order_products as $product)
{{ $product->product_name }}
| Location To |
Quantity |
@php
$transfer_locations = StockReOrderProduct::join('business_locations', 'stock_re_order_products.location_id', '=', 'business_locations.id')
->join('products', 'stock_re_order_products.product_id', '=', 'products.id')
->leftjoin('units', 'products.unit_id', '=', 'units.id')
->select(['business_locations.name as location', 'business_locations.location_id as p_location_number', 'stock_re_order_products.re_order_quantity as re_order_quantity', 'units.actual_name as actual_name', 'units.short_name as short_name'])
->where('stock_re_order_products.re_order_id', $stock_re_order_id)
->where('stock_re_order_products.variation_id', $product->variation_id)
->get();
@endphp
@foreach ($transfer_locations as $transfer_location)
| {{ $transfer_location->location }}
|
{{ number_format($transfer_location->re_order_quantity, 2) }}
@if (!empty($transfer_location->short_name))
{{ $transfer_location->short_name }}
@else
{{ $transfer_location->actual_name }}
@endif
|
@endforeach
@endforeach
@else
|
@lang('sale.product')
|
@if ($is_admin)
@foreach ($locations as $form_location)
({{ $form_location->name }})
|
@endforeach
@else
@foreach ($locations_for_table_headers as $business_location)
{{-- @if ($default_location->id != $business_location->id) --}}
{{ $business_location->location->name }}
|
{{-- @endif --}}
@endforeach
@endif
@foreach ($order_product_groups as $product)
|
{{ $product->product_name }}
({{ $product->sub_sku }})
|
@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
{{-- {{ dd($StockReOrderProducts) }} --}}
@foreach ($StockReOrderProducts as $product_location)
{{ number_format($product_location->re_order_quantity, 2) }} {{ $product->unit }}
|
@endforeach
@endforeach
@endif
{{--
--}}