{{-- New-Unity ERP | purchases/costs/_rows.blade.php | v1.3 | 26/07/2026 --}} {{-- v1.3 — Acciones: productos FG muestran badge "Módulo Producción" (sin botones edit/add). --}} {{-- v1.2 — Parte #: product_number (no id). Badge N Proveedor → dropdown Bootstrap 5 con AJAX. --}} {{-- v1.1 — Columna Proveedor con badge multi-proveedor. Botón "+ Agregar proveedor" en Acciones. --}} {{-- v1.0 — Partial con filas del tbody para AJAX sort sin recargar página. --}} @forelse($products as $product) {{-- Part # --}} {{ $product->product_number ?? $product->id }} {{-- Product Name --}} {{ $product->product_name }} @if($product->category?->group?->es_name) {{ $product->category->group->es_name }} / {{ $product->category->name }} @if($product->description) — {{ Str::limit($product->description, 40) }} @endif @elseif($product->description) {{ Str::limit($product->description, 60) }} @else {{ __('purchases.no-description') }} @endif {{-- SKU --}} {{ $product->sku ?? '—' }} {{-- Supplier + multi-supplier dropdown badge --}} @if($product->cost_id) {{ $product->supplier_name ?? __('purchases.generic-all-suppliers') }} @if(($product->cost_count ?? 0) > 1) @endif @else @endif {{-- Material Type --}} @if($product->material_type) {{ $product->material_type }} @else @endif {{-- Currency --}} @if($product->cost_id) {{ $product->currency }} @else @endif {{-- List Cost --}} @if($product->cost_id) ${{ number_format($product->list_cost, 2) }} @else {{ __('purchases.no-cost') }} @endif {{-- IVA % --}} @if($product->cost_id) {{ number_format($product->iva_perc, 2) }}% @else @endif {{-- Total Cost --}} @if($product->cost_id) ${{ number_format($product->total_cost, 2) }} @else @endif {{-- Actions --}} @if($product->material_type === 'FG') {{ __('purchases.fg-production-badge') }} @elseif($product->cost_id) @else @endif @empty {{ __('purchases.no-products') }} @endforelse