{{-- Shared faithful port of the LWR-document body used by TWO legacy emails: - MailHandler::sendEmailLWRToHeadDivision (L2711-2928) → LwrToHeadDivisionMail - MailHandler::sendEmailLWRToUserRevise (L3353-3585) → LwrRevisedMail The two legacy bodies are byte-identical EXCEPT two header labels, passed as $verboseExpectationLabels: head-division labels both expectation rows "Expectation"; the revise variant labels them "Customer Expectation" / "Project Initiator Expectation". All {{ }} auto-escape (safer than legacy's raw concatenation). Null-safe (?->) navigation mirrors legacy's LEFT JOINs. The details' Company/Address/Sales columns are LWR-level in the legacy query (joined off the parent header), so they render from the header relations, identical on every row. --}} @php $verboseExpectationLabels = $verboseExpectationLabels ?? false; $custExpLabel = $verboseExpectationLabels ? 'Customer Expectation' : 'Expectation'; $piExpLabel = $verboseExpectationLabels ? 'Project Initiator Expectation' : 'Expectation'; @endphp
LWR - Colorindo Chemtra {{-- Header --}}| LWR No. | : {{ str_pad((string) $lwr->ID, 6, '0', STR_PAD_LEFT) }} | Project Initiator | : {{ $lwr->userIDProjectInitiator?->Nama }} |
| Date | : {{ $lwr->Tanggal }} | Project Title | : {{ $lwr->ProjectTitle }} |
| Status | : {{ $lwr->labWorkRequestStatus?->StatusName }} | {{ $custExpLabel }} | : {{ $lwr->CustomerExpectations }} |
| Sales | : {{ $lwr->userIDSales?->Nama }} | {{ $piExpLabel }} | : {{ $lwr->ProjectInitiatorExpectations }} |
| Division | : {{ $lwr->division?->DivisionName }} | Microbiology | : {{ $lwr->Microbiology }} |
| Company Name | : {{ $lwr->company?->CompanyName }} | Analytical Lab | : {{ $lwr->AnalyticalLab }} |
| Company CP Name | : {{ $lwr->companyCP?->CompanyCPName }} | Formulation Lab | : {{ $lwr->FormulationLab }} |
| Company CP Address | : {{ $lwr->companyCP?->CompanyCPAddress }} | Other Lab | : {{ $lwr->OtherLab }} |
| Spesific Method | : {{ $lwr->SpesificMethod }} | Process Method | : {{ $lwr->ProcessMethod }} |
| Special Instructions | : {{ $lwr->SpecialInstructions }} | Method Remark | : {{ $lwr->MethodRemark }} |
| Company | Address | Sales | Principal | Product Category | ProductName | Colour | Type/Form | Volume | UnitPriceUSD | PotentialVolume | PotentialPrice | ProductRemark | History |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $lwr->company?->CompanyName }} | {{ $lwr->company?->CompanyAddress }} | {{ $lwr->userIDSales?->Nama }} | {{ $d->PrincipalName }} | {{ $d->ProductCategory }} | {{ $d->BarangName }} | {{ $d->Colour }} | {{ $d->type?->TypeName }} | {{ $d->Volume }} | {{ $d->UnitPriceUSD }} | {{ $d->PotentialVolume }} | {{ $d->PotentialPriceUSD }} | {{ $d->SalesRemark }} |
@foreach (($detailHistory[$d->ID] ?? []) as $a)
{{ $a->Tanggal }} | {{ $a->labWorkRequestDetailStatus?->StatusName }} | {{ $a->user?->Nama }} @endforeach |
| ID | Status | Tanggal | User | Comment |
|---|---|---|---|---|
| {{ $a->ID }} | {{ $a->labWorkRequestStatus?->StatusName }} | {{ $a->Tanggal }} | {{ $a->user?->Nama }} | {{ $a->Comment }} |