diff --git a/04_Laravel/resources/views/pdfs/awb.blade.php b/04_Laravel/resources/views/pdfs/awb.blade.php index b89455b..2e631fd 100644 --- a/04_Laravel/resources/views/pdfs/awb.blade.php +++ b/04_Laravel/resources/views/pdfs/awb.blade.php @@ -3,307 +3,420 @@
- -
-
- -
IFNEx
-
-
-

Shipment Waybill

-
We Deliver Value
-
-
- Date: {{ $shipment->created_at?->format('m/d/Y') }} -
+ + + + + + + + +
+ + +
IFNEX
+
We Deliver Value
+
SHIPMENT WAYBILL
+
+ @if($barcode_base64) + barcode
+ @endif +
{{ $shipment->awb_no }}
+
Date: {{ $shipment->created_at?->format('m/d/Y') }}
+
+ + +
+ + Service: {{ $service_label }}  |  Type: {{ $type_label }} + + From: {{ strtoupper($shipment->fromCountry?->name ?? '—') }} ({{ $shipment->fromCountry?->iso_code }}) + → + To: {{ strtoupper($shipment->toCountry?->name ?? '—') }} ({{ $shipment->toCountry?->iso_code }})
- -
- @if($barcode_base64) - barcode - @endif -
{{ $shipment->awb_no }}
-
+ + + + + + + + +
+
SHIPPER
+ + @if($shipper['company']) + + @endif + + + @if($shipper['email']) + + @endif + + @if($shipper['city']) + + @endif + @if($shipper['zip']) + + @endif + @if($shipper['id_number']) + + @endif +
Company{{ $shipper['company'] }}
Contact Name{{ $shipper['name'] ?: '—' }}
Phone{{ $shipper['phone'] ?: '—' }}
Email{{ $shipper['email'] }}
Address{{ $shipper['address'] ?: '—' }}
City{{ $shipper['city'] }}
Zip Code{{ $shipper['zip'] }}
ID Number{{ $shipper['id_number'] }}
+
+
RECEIVER
+ + @if($receiver['company']) + + @endif + + + @if($receiver['email']) + + @endif + + @if($receiver['city']) + + @endif + @if($receiver['zip']) + + @endif + @if($receiver['id_number']) + + @endif +
Company{{ $receiver['company'] }}
Contact Name{{ $receiver['name'] ?: '—' }}
Phone{{ $receiver['phone'] ?: '—' }}
Email{{ $receiver['email'] }}
Address{{ $receiver['address'] ?: '—' }}
City{{ $receiver['city'] }}
Zip Code{{ $receiver['zip'] }}
ID Number{{ $receiver['id_number'] }}
+
- -
-
-
SHIPPER
-
From: {{ $shipper['city'] }}, {{ $shipment->fromCountry?->name }} ({{ $shipment->fromCountry?->iso_code }})
-
Company Name:{{ $shipper['company'] ?: '—' }}
-
Contact Name:{{ $shipper['name'] }}
-
Tel / Mob:{{ $shipper['phone'] }}
-
Email:{{ $shipper['email'] ?: '—' }}
-
Address:{{ $shipper['address'] }}
-
ID Number:{{ $shipper['id_number'] ?: '—' }}
-
Zip Code:{{ $shipper['zip'] ?: '—' }}
-
+ + + + + + + + +
+
SHIPMENT
+ + + @if($shipment->dimensions) + + @endif + @if($shipment->volumetric_weight) + + @endif + + @if($invoice_total_usd > 0) + + @endif + @php + $contentDesc = $items->isNotEmpty() + ? $items->pluck('description')->implode(', ') + : ($shipment->content_description ?: $shipment->reason_for_export ?: 'General Goods'); + @endphp + +
Gross Weight{{ $shipment->weight ?: '—' }} Kg
Dimensions{{ $shipment->dimensions }} cm
Volumetric Weight{{ $shipment->volumetric_weight }} Kg
Chargeable Weight{{ $shipment->chargeable_weight ?: max($shipment->weight ?? 0, $shipment->volumetric_weight ?? 0) }} Kg
Declared Value{{ number_format($invoice_total_usd, 0) }} USD
Content{{ $contentDesc }}
+
+
PAYMENT
+ + + @if(($shipment->extra_service ?? 0) > 0) + + @endif + @if(($shipment->domestic_pickup ?? 0) > 0) + + @endif + @if(($shipment->packing_cost ?? 0) > 0) + + @endif + @if(($shipment->domestic_delivery ?? 0) > 0) + + @endif + @if(($shipment->warehousing_cost ?? 0) > 0) + + @endif + @if(($shipment->discount ?? 0) > 0) + + @endif + + @if($shipment->cod_amount) + + @endif +
Shipping Price{{ $shipment->shipping_price ? number_format($shipment->shipping_price, 0) : '—' }}
Extra Service{{ number_format($shipment->extra_service) }}
Domestic Pickup{{ number_format($shipment->domestic_pickup) }}
Packing Cost{{ number_format($shipment->packing_cost) }}
Domestic Delivery{{ number_format($shipment->domestic_delivery) }}
Warehousing{{ number_format($shipment->warehousing_cost) }}
Discount-{{ number_format($shipment->discount) }}
TOTAL FEE{{ number_format($shipment->total_fee ?? 0) }} IRR
Cash on Delivery{{ number_format($shipment->cod_amount, 0) }} AED
+
-
-
RECEIVER
-
To: {{ $receiver['city'] }}, {{ $shipment->toCountry?->name }} ({{ $shipment->toCountry?->iso_code }})
-
Company Name:{{ $receiver['company'] ?: '—' }}
-
Contact Name:{{ $receiver['name'] }}
-
Tel / Mobile:{{ $receiver['phone'] }}
-
Email:{{ $receiver['email'] ?: '—' }}
-
Address:{{ $receiver['address'] }}
-
City:{{ $receiver['city'] ?: '—' }}
-
Zip Code:{{ $receiver['zip'] ?: '—' }}
-
-
- - -
-
-
SHIPMENT
-
Gross Weight:{{ $shipment->weight }} (Kg)
-
Dimensions:{{ $shipment->dimensions ?: '—' }} (cm)
-
Volumetric Weight:{{ $shipment->volumetric_weight }} (Kg)
-
Chargeable Weight:{{ $shipment->chargeable_weight ?: max($shipment->weight, $shipment->volumetric_weight) }} (Kg)
-
Value:{{ $invoice_total_usd > 0 ? number_format($invoice_total_usd, 0) . ' (USD)' : '—' }}
-
Service:{{ $service_label }}
-
Type:{{ $type_label }}
-
Content:{{ $shipment->content_description ?: $shipment->reason_for_export ?: 'General Goods' }}
-
- -
-
PAYMENT
-
Shipping Price:{{ $shipment->shipping_price ? number_format($shipment->shipping_price, 2) : '—' }}
-
Extra Service:{{ number_format($shipment->extra_service ?? 0) }}
-
Domestic Pickup:{{ number_format($shipment->domestic_pickup ?? 0) }}
-
Packing Cost:{{ number_format($shipment->packing_cost ?? 0) }}
-
Domestic Delivery:{{ number_format($shipment->domestic_delivery ?? 0) }}
-
Warehousing:{{ number_format($shipment->warehousing_cost ?? 0) }}
-
Discount:{{ number_format($shipment->discount ?? 0) }}
-
Total Fee:{{ number_format($shipment->total_fee ?? 0) }} IRR
-
Cash on Delivery:{{ $shipment->cod_amount ? number_format($shipment->cod_amount, 2) . ' AED' : '—' }}
-
-
- - + @if($items->isNotEmpty()) -
-
Shipment Details
- +
+
SHIPMENT DETAILS
+
- - - - - - + + + + + + @@ -311,14 +424,14 @@ - + @endforeach - - + + @@ -326,34 +439,35 @@ @endif - +
- Please note that:
- Door-to-door Services is only applicable when the shipment is general cargo and does not require any special approvals or regulations in origin & destination.
- Only Consignee is aware of the importing rules in the destination and consignee is the person who is in contact with the shipper.
- The Courier Company cannot guarantee the clearance since All shipments are subjected to customs approval at Origin and Destination. +
⚠ Terms & Conditions
+ Door-to-door service applies only to general cargo without special approvals. Consignee is responsible for import rules at destination. All shipments are subject to customs approval at origin and destination. The courier company cannot guarantee clearance.
- -
-
- Shipper Name & Signature: -
-
-
- Date: -
...../...../..........
-
-
+ +
NoDescriptionH.S. CodeQtyUnit Price (USD)Total (USD)NoDescriptionH.S. CodeQtyUnit Price (USD)Total (USD)
{{ $item->row_number }} {{ $item->description }}{{ $item->hs_code }}{{ $item->hs_code ?: '—' }} {{ $item->quantity }} {{ number_format($item->unit_price, 2) }} {{ number_format($item->total_usd, 2) }}
Total Invoice Amount in USD:
Total Invoice Amount (USD): {{ number_format($invoice_total_usd, 2) }}
+ + + + +
+ Shipper Name & Signature +
+
+ Date +
...../...../..........
+
- + - + \ No newline at end of file diff --git a/04_Laravel/resources/views/pdfs/import_invoice.blade.php b/04_Laravel/resources/views/pdfs/import_invoice.blade.php index a847850..6871a5c 100644 --- a/04_Laravel/resources/views/pdfs/import_invoice.blade.php +++ b/04_Laravel/resources/views/pdfs/import_invoice.blade.php @@ -8,13 +8,12 @@ font-family: DejaVu Sans, Arial, sans-serif; font-size: 10px; color: #000; - background: #fff; } + /* ⚠️ Dompdf از box-sizing: border-box پشتیبانی نمی‌کند — + حاشیه‌ها با @page و width با 100% ناحیه چاپ */ + @page { margin: 15mm; } .page { - width: 210mm; - min-height: 297mm; - padding: 15mm; - margin: 0 auto; + width: 100%; } /* ─── HEADER ─── */ diff --git a/04_Laravel/resources/views/pdfs/invoice.blade.php b/04_Laravel/resources/views/pdfs/invoice.blade.php index 36a88ba..f5ff444 100644 --- a/04_Laravel/resources/views/pdfs/invoice.blade.php +++ b/04_Laravel/resources/views/pdfs/invoice.blade.php @@ -8,13 +8,12 @@ font-family: DejaVu Sans, Arial, sans-serif; font-size: 10px; color: #000; - background: #fff; } + /* ⚠️ Dompdf از box-sizing: border-box پشتیبانی نمی‌کند — + حاشیه‌ها با @page و width با 100% ناحیه چاپ */ + @page { margin: 10mm; } .page { - width: 210mm; - min-height: 297mm; - padding: 10mm; - margin: 0 auto; + width: 100%; } /* ─── HEADER ─── */ diff --git a/04_Laravel/storage/awb-fixed.pdf b/04_Laravel/storage/awb-fixed.pdf new file mode 100644 index 0000000..ca6fdbd Binary files /dev/null and b/04_Laravel/storage/awb-fixed.pdf differ diff --git a/04_Laravel/storage/invoice-fixed.pdf b/04_Laravel/storage/invoice-fixed.pdf new file mode 100644 index 0000000..1bdcdcf Binary files /dev/null and b/04_Laravel/storage/invoice-fixed.pdf differ diff --git a/04_Laravel/storage/label-fixed.pdf b/04_Laravel/storage/label-fixed.pdf new file mode 100644 index 0000000..c3488f5 Binary files /dev/null and b/04_Laravel/storage/label-fixed.pdf differ