@extends('layouts.app') @section('title', 'PC Build — ' . $build->build_no) @section('breadcrumb')
{{ $build->build_name ?? 'PC Build' }}
| Customer | {{ $build->customer?->name ?? $build->customer_name ?? 'Walk-in' }} |
| Phone | {{ $build->customer?->phone ?? $build->customer_phone }} |
| Status | @php $badge = match($build->status) { 'draft' => 'secondary', 'quoted' => 'info', 'confirmed' => 'primary', 'built' => 'warning', 'sold' => 'success', 'cancelled' => 'danger', default => 'secondary', }; @endphp {{ ucfirst($build->status) }} |
| Created By | {{ $build->creator?->name ?? '—' }} |
| Date | {{ $build->created_at->format('d M Y, h:i A') }} |
| Total Cost | ৳{{ number_format($build->total_cost_price, 2) }} |
| Selling Price | ৳{{ number_format($build->total_selling_price, 2) }} |
| Discount | −৳{{ number_format($build->discount, 2) }} |
| Final Price | ৳{{ number_format($build->final_price, 2) }} |
| Profit | ৳{{ number_format($build->total_profit, 2) }} |
| Margin | {{ $build->total_selling_price > 0 ? number_format(($build->total_profit / $build->total_selling_price) * 100, 1) : 0 }}% |
| Type | Component | Serial No | Qty | Cost | Selling | Profit |
|---|---|---|---|---|---|---|
| {{ $componentTypes[$item->component_type] ?? ucfirst($item->component_type) }} |
{{ $item->component_name }}
@if($item->productVariant)
SKU: {{ $item->productVariant->sku }}
@endif
|
{{ $item->serial_no ?? '—' }} | {{ $item->qty }} | ৳{{ number_format($item->total_cost_price, 2) }} | ৳{{ number_format($item->total_selling_price, 2) }} | ৳{{ number_format($item->profit, 2) }} |
| Total | ৳{{ number_format($build->total_cost_price, 2) }} | ৳{{ number_format($build->total_selling_price, 2) }} | ৳{{ number_format($build->total_profit, 2) }} | |||