1. Exporter
@foreach($shipment->companies as $company) @if((int)$company->pivot->type === 1) {{ strtoupper($company->name) }} @break @endif @endforeach
2. Number
@if($shipment->internalNumber !== null) {{$shipment->internalNumber}} @else {{$shipment->number}} @endif


ORIGINAL
3. ISSUING AUTHORITY
TANZANIA TOBACCO BOARD
P.O. BOX 61
TABORA
Tel. 255-026-2604417
e-mail address: info@tobaccoboard.go.tz
4. Consignee
@foreach($shipment->companies as $company) @if((int)$company->pivot->type === 2) {{ strtoupper($company->name) }} @break @endif @endforeach
6. Means of Transport
Ship on Board
@if(!empty($shipment->vessel)) Vessel: {{ucwords($shipment->vessel->name)}} @endif
5.

CERTIFICATE OF AUTHENTICITY TOBACCO
(Subheadings , , , and of the combined nomenclature)

@php $gross = 0 @endphp @php $net = 0 @endphp @php $cartons = 0 @endphp @foreach($shipment->consignments as $consignment) @php $gross += $consignment->cartons->sum('gross') @endphp @php $net += $consignment->cartons->sum('net') @endphp @php $cartons += count($consignment->cartons) @endphp @endforeach 7. Marks and Nos. Number and kind of package

{{ number_format($cartons, 0, '.', ',') }} CARTONS OF {{strtoupper($shipment->description)}}

{{number_format($net, 2, '.', ',')}} NET KGS
@foreach($shipment->grades as $grade) @if($grade->pivot->type === 2) GRADE:{{strtoupper($grade->name)}} @break @endif @endforeach

@foreach($shipment->consignments as $consignment) {{strtoupper($consignment->container->number)}}
@endforeach
8. Gross weight (kg)

{{number_format($gross, 2, '.', ',')}}

9. Net weight (kg)

{{number_format($net, 2, '.', ',')}}

10. Net weight (kg) (in words)
{{strtoupper($theNet)}}
11.
I hereby certify that the tobacco described in this certificate is {{strtoupper($shipment->description)}} - Tobacco Type

PLACE: MOROGORO                                                                                                          DATE: {{date('d/m/Y')}}

Stamp (or printed seal) and signature and title of Exporter official
               (!) Delete as appropriate