@extends('layouts.app') @section('content') @php $order = $installation->order; $orderItem = $installation->orderItem; $customer = $order->customer ?? null; $formatDateInput = function ($date) { if (empty($date)) return ''; try { return \Carbon\Carbon::parse($date)->format('Y-m-d'); } catch (\Throwable $e) { return ''; } }; $formatDateDisplay = function ($date) { if (empty($date)) return '-'; try { return \Carbon\Carbon::parse($date)->format('d/m/Y'); } catch (\Throwable $e) { return '-'; } }; /* * Sinkron dari data Create Order. * Kalau data di pemasangan outdoor masih kosong, ambil dari data item order/customer. */ $syncedCustomerName = $order->customer_name ?? ($customer->name ?? '-'); $syncedCompany = $installation->received_by_company ?: ($customer->company_name ?? $customer->contact_person ?? $customer->name ?? $order->customer_name ?? ''); $syncedLocation = $installation->location ?: ($orderItem->outdoor_installation_location ?? $orderItem->installation_location ?? ''); $syncedTargetDate = $installation->target_date ?: ($orderItem->outdoor_installation_target_date ?? $orderItem->installation_target_date ?? null); $syncedNotes = $installation->notes ?: ($orderItem->outdoor_installation_notes ?? $orderItem->installation_notes ?? ''); $targetDateValue = old('target_date', $formatDateInput($syncedTargetDate)); $locationValue = old('location', $syncedLocation); $companyValue = old('received_by_company', $syncedCompany); $notesValue = old('notes', $syncedNotes); @endphp
{{ $order->invoice_number ?? '-' }} — {{ $orderItem->product_name ?? '-' }}
Dokumentasi pekerjaan pemasangan outdoor. Foto yang sudah diupload tampil lebih dulu, form tambah foto ada di bawah.