| {{ ($products->currentPage() - 1) * $products->perPage() + $loop->iteration }} |
@php
$stocks = $product->stocks->map(function ($batch) use ($product) {
return [
'batch_no' => $batch->batch_no,
'expire_date' => $batch->expire_date ? formatted_date($batch->expire_date) : 'N/A',
'productStock' => $batch->productStock ?? 0,
'productSalePrice' => $batch->productSalePrice ?? 0,
'productDealerPrice' => $batch->productDealerPrice ?? 0,
'productPurchasePrice' => $batch->productPurchasePrice ?? 0,
'exclusive_price' => $batch->exclusive_price ?? 0,
'productWholeSalePrice' => $batch->productWholeSalePrice ?? 0,
'warehouse' => $batch->warehouse?->name ?? ($product->warehouse?->name ?? ''),
'rack' => $product->rack?->name ?? '',
'shelf' => $product->shelf?->name ?? '',
];
});
@endphp
{{ $product->productName }}
|
{{ $product->productCode }} |
{{ $product->hsn_code }} |
{{ $product->category->categoryName ?? '' }} |
@usercan('stocks.price')
{{ currency_format(optional($firstStock)->productPurchasePrice, currency: business_currency()) }}
|
@endusercan
{{ $total_stock }}
|
{{ currency_format(optional($firstStock)->productSalePrice, currency: business_currency()) }}
|
{{ currency_format($total_value, currency: business_currency()) }} |
@endforeach
@if ($products->count() > 0)
@endif