ifnex/04_Laravel/resources/views/pdfs/label.blade.php
Kazem Alghasi 5874568c63 feat(shipment): implement PDF generation for AWB, invoice, and labels
Introduce PDF generation capabilities for shipments using laravel-dompdf.
This includes a new service layer, dedicated controller, and routes
to handle the generation of Air Waybills (AWB), Invoices, and Shipping
Labels.

- Add `PdfService` to encapsulate PDF generation logic.
- Add `ShipmentPdfController` to handle PDF download requests.
- Integrate `barryvdh/laravel-dompdf` dependency.
- Add Filament header actions to view shipment pages for quick PDF access.
- Update order success view to provide direct download links for documents.
- Add label methods to `ShipmentDirection` and `ShipmentType` enums.
- Update project status documentation to reflect initial PDF implementation.
2026-08-04 09:20:23 +03:30

58 lines
3.3 KiB
PHP

<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: DejaVu Sans, sans-serif; font-size: 10px; direction: rtl; text-align: right; }
.container { padding: 10px; }
.header { text-align: center; margin-bottom: 10px; }
.header .logo { font-size: 14px; font-weight: bold; color: #f37021; }
.header .awb { font-size: 16px; font-weight: bold; background: #f37021; color: white; padding: 3px 8px; display: inline-block; margin-top: 3px; }
.section { margin-bottom: 8px; border: 1px solid #ddd; padding: 6px; }
.section-title { font-weight: bold; color: #f37021; font-size: 10px; margin-bottom: 3px; }
.row { display: flex; margin-bottom: 2px; }
.label { width: 90px; font-weight: bold; color: #555; }
.value { flex: 1; }
.footer { text-align: center; font-size: 8px; color: #999; margin-top: 8px; border-top: 1px solid #ddd; padding-top: 5px; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo">IFNEX LOGISTICS</div>
<div class="awb">{{ $shipment->awb_no }}</div>
</div>
<div class="section">
<div class="section-title">SHIPPER / فرستنده</div>
<div class="row"><span class="label">Name:</span><span class="value">{{ $shipper['name'] }}</span></div>
<div class="row"><span class="label">Company:</span><span class="value">{{ $shipper['company'] }}</span></div>
<div class="row"><span class="label">Phone:</span><span class="value">{{ $shipper['phone'] }}</span></div>
<div class="row"><span class="label">Address:</span><span class="value">{{ $shipper['address'] }}</span></div>
</div>
<div class="section">
<div class="section-title">RECEIVER / گیرنده</div>
<div class="row"><span class="label">Name:</span><span class="value">{{ $receiver['name'] }}</span></div>
<div class="row"><span class="label">Company:</span><span class="value">{{ $receiver['company'] }}</span></div>
<div class="row"><span class="label">Phone:</span><span class="value">{{ $receiver['phone'] }}</span></div>
<div class="row"><span class="label">Address:</span><span class="value">{{ $receiver['address'] }}</span></div>
</div>
<div class="section">
<div class="section-title">SHIPMENT</div>
<div class="row"><span class="label">Gross Weight:</span><span class="value">{{ $shipment->weight }} kg</span></div>
<div class="row"><span class="label">Volumetric:</span><span class="value">{{ $shipment->volumetric_weight }} kg</span></div>
<div class="row"><span class="label">Dimensions:</span><span class="value">{{ $shipment->dimensions }}</span></div>
<div class="row"><span class="label">From:</span><span class="value">{{ $shipment->fromCountry?->name }}</span></div>
<div class="row"><span class="label">To:</span><span class="value">{{ $shipment->toCountry?->name }}</span></div>
</div>
<div class="footer">
IFNEX Logistics | {{ $shipment->awb_no }}
</div>
</div>
</body>
</html>