@extends('shop.layout') @section('title', $part->name) @section('content') @php $currency = $tenant->settings['currency'] ?? 'MDL'; $stock = (float) $part->qty; $imgs = $part->imageUrls(); @endphp {{ __('portal.shop.back_to_catalog') }} @if (! empty($imgs))
{{ $part->name }}
@if (count($imgs) > 1)
@foreach ($imgs as $i => $url) @endforeach
@endif
@else
@endif

{{ $part->name }}

{{ $part->brand ? __('portal.shop.brand_label') . ' ' . $part->brand : '' }} {{ $part->article ? ' · ' . __('portal.shop.code_label') . ' ' . $part->article : '' }} {{ $part->category ? ' · ' . $part->category : '' }}
{{ $stock > 0 ? __('portal.shop.in_stock_qty', ['qty' => rtrim(rtrim(number_format($stock, 2), '0'), '.'), 'unit' => $part->unit ?? __('portal.tracking.unit_pcs')]) : __('portal.shop.on_order') }}
{{ number_format((float) $part->sell_price, 2) }} {{ $currency }}
@csrf
@if ($part->crossRefs->isNotEmpty())

{{ __('portal.shop.cross_refs_title') }}

@foreach ($part->crossRefs as $cr) {{ $cr->cross_article }}{{ $cr->brand ? ' (' . $cr->brand . ')' : '' }} @endforeach
@endif @if ($part->notes)

{{ __('portal.shop.description') }}

{{ $part->notes }}

@endif @if ($img ?? null)
{{-- /right column --}}
{{-- /card grid --}} @else
{{-- /card --}} @endif @endsection