BUKTI SERAH TERIMA PRODUK
No. Dokumen:
#HT-{{ $order->id }}
Tanggal Serah Terima:
{{ $order->handover_at ? $order->handover_at->format('d M Y H:i') : now()->format('d M Y H:i') }}
Order ID:
#{{ $order->id }}
Customer:
{{ $order->customer_name }}
Email:
{{ $order->customer_email }}
Telepon:
{{ $order->phone_number ?? '-' }}
Status:
{{ $order->handover_status_label ?? 'N/A' }}
Diserahkan Oleh:
{{ $order->handoverBy->name ?? 'Admin' }}
@if($order->production && $order->production->teknisi)
Teknisi:
{{ $order->production->teknisi->name }}
@endif
@if($order->production && $order->production->supervisor)
Supervisor:
{{ $order->production->supervisor->name }}
@endif
Alamat Pengiriman:
{{ $order->address ?? '-' }}
DETAIL PRODUK YANG DISERAHKAN
| Produk |
Quantity |
Harga Satuan |
Total Harga |
| {{ $order->product->product_title ?? 'N/A' }} |
{{ $order->quantity }} unit |
Rp {{ number_format($order->price, 0, ',', '.') }} |
Rp {{ number_format($order->total_price, 0, ',', '.') }} |
@if($order->payment_method === 'dp')
@php
$dpPercentage = $order->dp_percentage ?? 30.00;
$dpAmount = $order->total_price * ($dpPercentage / 100);
$remainingAmount = $order->total_price - $dpAmount;
if ($order->receivable) {
$paidAmount = $order->receivable->paid_amount ?? 0;
$remainingAmount = $order->receivable->remaining_amount ?? $remainingAmount;
} else {
$paidAmount = $order->status === 'selesai' ? $order->total_price : $dpAmount;
$remainingAmount = $order->status === 'selesai' ? 0 : $remainingAmount;
}
@endphp
RINCIAN PEMBAYARAN
Total Harga:
Rp {{ number_format($order->total_price, 0, ',', '.') }}
DP ({{ number_format($dpPercentage, 0) }}%):
Rp {{ number_format($dpAmount, 0, ',', '.') }}
Sudah Dibayar:
Rp {{ number_format($paidAmount, 0, ',', '.') }}
Sisa Pembayaran:
Rp {{ number_format($remainingAmount, 0, ',', '.') }}
@if($order->status === 'selesai')
✅ PEMBAYARAN LUNAS
@else
⚠️ SISA PEMBAYARAN: Rp {{ number_format($remainingAmount, 0, ',', '.') }}
@endif
@else
INFORMASI PEMBAYARAN
Total Harga:
Rp {{ number_format($order->total_price, 0, ',', '.') }}
Metode Pembayaran:
{{ ucfirst($order->payment_method) }}
Status Pembayaran:
{{ $order->status_label }}
@if($order->status === 'selesai')
✅ PEMBAYARAN LUNAS
@endif
@endif
@if($order->handover_photos && count($order->handover_photos) > 0)
FOTO BUKTI SERAH TERIMA
@foreach($order->handover_photos as $index => $photo)
@php
// Path foto berdasarkan store('handover', 'uploads')
// File disimpan di: public/uploads/handover/...
$photoPath = public_path('uploads/' . $photo);
// Convert to base64 untuk DomPDF
$imageData = '';
if (file_exists($photoPath)) {
$imageInfo = @getimagesize($photoPath);
$mimeType = $imageInfo ? $imageInfo['mime'] : 'image/jpeg';
$imageData = 'data:' . $mimeType . ';base64,' . base64_encode(file_get_contents($photoPath));
}
@endphp
@if($imageData)
Foto {{ $index + 1 }}
@endif
@endforeach
@endif
@if($order->handover_notes)
Catatan Serah Terima:
{!! nl2br(e($order->handover_notes)) !!}
@endif
@if($order->production && ($order->production->result_photos || $order->production->test_results || $order->production->final_specifications))
INFORMASI PRODUKSI
@if($order->production->final_specifications)
Spesifikasi Produk:
{!! nl2br(e($order->production->final_specifications)) !!}
@endif
@if($order->production->test_results)
Hasil Pengujian:
{!! nl2br(e($order->production->test_results)) !!}
@endif
@endif
Total Harga:
Rp {{ number_format($order->total_price, 0, ',', '.') }}
@if($order->payment_method === 'dp' && $order->status !== 'selesai')
Sisa Pembayaran:
Rp {{ number_format($remainingAmount, 0, ',', '.') }}
@endif
Syarat & Ketentuan:
1. Produk telah diterima dalam kondisi baik dan sesuai spesifikasi
2. Garansi 1 tahun untuk mesin yang diproduksi
3. Service dan maintenance tersedia di workshop kami
4. Klaim garansi harus disertai dokumen ini
5. Dokumen ini berlaku sebagai bukti serah terima yang sah
Yang Menerima
({{ $order->customer_name }})
{{ $order->customer_confirmed_at ? $order->customer_confirmed_at->format('d M Y') : 'Tanggal: ___________' }}
Yang Menyerahkan
({{ $order->handoverBy->name ?? 'Admin POLJAM TECH' }})
{{ $order->handover_at ? $order->handover_at->format('d M Y') : now()->format('d M Y') }}