@php $batchReportRecords = ($availableBatches ?? collect())->values(); $batchMarqueeRecords = $batchReportRecords; while ($batchReportRecords->isNotEmpty() && $batchMarqueeRecords->count() < 3) { $batchMarqueeRecords = $batchMarqueeRecords->concat($batchReportRecords)->values(); } @endphp
CERTIFICATIONS & BATCH REPORTS

Certified Organic, Tested for Buyer Confidence

Buyers can review current organic compliance and batch-wise quality evidence before starting bulk, wholesale, or export conversations.

{{--
Only Current Certificates

Expired, inactive, or upcoming certificates stay out of the buyer-facing list.

Batch-wise Reports

Lab reports are connected to individual batches instead of being mixed into one document list.

Available Stock Only

Sold-out batches disappear automatically from this section while staying saved in admin history.

--}}
Verified Supply

Compliance and quality, clearly separated.

Certificates confirm organic status. Batch reports connect quality checks to available stock.

0
Active Certificates
0
Available Batches
0
Lab Reports
Organic Certifications

Current certificate records

@forelse (($certificates ?? collect()) as $certificate)
{{ $certificate->certificate_type }}

{{ $certificate->title }}

{{ $certificate->description ?: 'Current BAOPCL organic certification record.' }}

Valid until: {{ optional($certificate->valid_until)->format('d M Y') ?: 'Open' }}
Open Certificate PDF ->
@empty
No active certificates available

Current certificates will appear here after they are added in admin.

@endforelse
Batch-wise Lab Reports

Current batch quality reports

Sold-out batches are hidden automatically. Only active batches with available quantity appear here.

@if ($batchReportRecords->isNotEmpty())
@foreach ([false, true] as $isDuplicate) @foreach ($batchMarqueeRecords as $batch) @php($primaryReport = $batch->activeLabReports->first())
Batch {{ $batch->batch_number }}

{{ $batch->title ?: $batch->productLabel() }}

{{ $batch->productLabel() }}

Available Quantity
{{ number_format((float) $batch->remaining_quantity, 0) }} {{ $batch->quantity_unit }}
Reports
@forelse ($batch->activeLabReports as $report) @empty Reports will appear after upload. @endforelse
@if ($primaryReport) @else
PDF not uploaded yet
@endif
@endforeach @endforeach
@else
No available batches right now

Active batches with remaining quantity will appear here automatically.

@endif