@extends('layout') @section('content')

Product: {{ $product->name }}

Edit Back
Category: {{ optional($product->category)->name ?? '—' }}
Brand: {{ $product->brand ?? '—' }}
Model: {{ $product->model ?? '—' }}
IMEI: {{ $product->imei ?? '—' }}
Serial: {{ $product->serial_number ?? '—' }}
Price: {{ number_format($product->price, 2) }}
Stock: {{ $product->stock ?? '—' }}

Agreements

@if($product->agreements->isEmpty())

No agreements.

@else
@foreach($product->agreements as $a) @endforeach
ID Customer Total Instalments Status
{{ $a->id }} {{ optional($a->customer)->name ?? $a->customer_name }} {{ $currency }}{{ number_format($a->total_amount, 2) }} {{ $a->instalments_count }} × {{ $currency }}{{ number_format($a->instalment_amount, 2) }} @if($a->status === 'completed') Completed @elseif($a->status === 'active') Active @else Draft @endif View
@endif @endsection @push('scripts') @vite(['resources/js/app.js']) @endpush