{{-- Faithful port of legacy MailHandler::sendEmailSOToUserRevise HTML (L2930). All {{ }} auto-escape (safer than legacy's raw concatenation). Null-safe navigation mirrors legacy's LEFT JOINs (missing lookups → empty cells). Sent on PM Revise AND Reject — the body is identical; only the subject branches (see SampleOrderRevisedMail::envelope). --}} Colorindo Chemtra - Sample Order Request {{-- Header --}}

 Header

Sample Order No.   : {{ str_pad((string) $sampleOrder->ID, 6, '0', STR_PAD_LEFT) }}
Request Date   : {{ $sampleOrder->Tanggal }}
Division   : {{ $sampleOrder->division?->DivisionName }}
Requester   : {{ $sampleOrder->userIDInput?->Nama }}
Sales   : {{ $sampleOrder->userIDSales?->Nama }}
Delivery   : {{ $sampleOrder->delivery?->DeliveryName }}
Company Name   : {{ $sampleOrder->company?->CompanyName }}
Company Address   : {{ $sampleOrder->company?->CompanyAddress }}
CompanyTelephone   : {{ $sampleOrder->company?->CompanyTelephone }}
Company CP Name   : {{ $sampleOrder->companyCP?->CompanyCPName }}
Company CP Address   : {{ $sampleOrder->companyCP?->CompanyCPAddress }}
Company CP Telephone   : {{ $sampleOrder->companyCP?->CompanyCPTelephone }}
Comment   : {{ $sampleOrder->Comment }}
Project   : {{ $sampleOrder->Project }}
{{-- Details --}}

 Details

@foreach ($details as $i => $d) @endforeach
ID Status Principal Original Product Name Product Name Quantity Satuan Application Name RemarksSuratJalan Project/RemarkInternal History
{{ $d->ID }} {{ $d->sampleOrderDetailStatus?->StatusDetailName }} {{ $d->barang?->principal?->PrincipalName }} {{ $d->barang?->NamaBarang }} {{ $d->ProductName }} {{ number_format((float) $d->Quantity, 2, ',', '.') }} {{ $d->satuan?->SatuanName }} {{ $d->application?->ApplicationName }} {{ $d->Remarks }} {{ $d->RemarkInternal }} @foreach (($detailHistory[$d->ID] ?? []) as $a) {{ $a->Tanggal }} | {{ $a->sampleOrderDetailStatus?->StatusDetailName }} | {{ $a->user?->Nama }} | {{ $a->Remark }}
@endforeach
{{-- Header history --}}

 History Sample Order Request

@foreach ($history as $a) @endforeach
ID Status Tanggal User Comment
{{ $a->ID }} {{ $a->sampleOrderStatus?->StatusName }} {{ $a->Tanggal }} {{ $a->user?->Nama }} {{ $a->Comment }}