@props(['product', 'bodegaCode' => null]) @php $inventoryEnabled = \App\Models\Setting::getByKey('inventory_enabled'); $showInventory = ($inventoryEnabled === '1' || $inventoryEnabled === 1 || $inventoryEnabled === true); $vacationInfo = \App\Models\Setting::getVacationModeInfo(); $isVacationMode = $vacationInfo['active']; $formattedVacationDate = $vacationInfo['formatted_date'] ?? 'pronto'; @endphp
{{$product->sku}}
@endif @auth @php $isManaged = $product->isInventoryManaged(); // Use orderable stock (available - safety) for client-facing display $orderableStock = $product->getOrderableStockForBodega($bodegaCode); @endphp @if($showInventory && $isManaged) @if($orderableStock <= 0)Producto no disponible para tu ubicación
@elseInventario: {{ $orderableStock }}
@endif @endif @else @php $isManaged = $product->isInventoryManaged(); // Use orderable stock (available - safety) for client-facing display $orderableStock = $product->getOrderableStockForMdtat(); @endphp @if($showInventory && $isManaged) @if($orderableStock <= 0)Producto no disponible para tu ubicación
@elseInventario: {{ $orderableStock }}
@endif @endif @endauth(Und. x) ${{ currency($product->final_price['perItemPrice']) }}
@endif