ifnex/04_Laravel/resources/views/pdfs/awb.blade.php
Kazem Alghasi 31d28fbe68 docs(pdf): add technical mapping and implementation notes to templates
Add detailed documentation within AWB, Invoice, and Label PDF templates
to map HTML elements to specific Excel cell references and VLOOKUP
sources. This includes requirements for fonts, colors, and dimensions
to ensure future alignment with official IFNEX branding and Excel
templates.

Also update project status to reflect completed middleware configuration
tasks.
2026-08-04 09:50:53 +03:30

155 lines
9.7 KiB
PHP

<!DOCTYPE html>
<!--
AWB PDF TEMPLATE TODO: تطبیق نهایی با قالب اکسل
Excel Reference: شیت «AWB» در فایل 01KYWGVNKS5TNMN37RV77PCYNZ.xlsx
Cell Mapping:
- A1: لوگوی IFNEX (image2.png, 169x159px)
- C1:D1: «Shipment Waybill»
- K11:K12: AWB Number (lookup key)
- A6:A13: SHIPPER section
- D6:D13: RECEIVER section
- A14:A22: SHIPMENT section
- D14:D22: PAYMENT section
- D24:E24: Shipper Signature line
- D28:E28: Track URL
VLOOKUP Source: شیت «List» (A3:AD3938)
Required Fields:
- Shipper: Name, Company, Phone, Email, Address, City, Zip, ID Number
- Receiver: Name, Company, Phone, Email, Address, City, Zip
- Shipment: Gross Weight, Volumetric Weight, Chargeable Weight, Dimensions, Service Type, Direction, From/To Country, Forwarder, Content
- Payment: Shipping Price (AED), Extra Service (IRR), Packing Cost (IRR), Domestic Pickup (IRR), Domestic Delivery (IRR), Warehousing Cost (IRR), Discount (IRR), Total Fee (IRR), Net Dirham (AED)
Font: باید فونت رسمی IFNEX استفاده شود (در حال حاضر DejaVu Sans جایگزین شده)
Colors: عنوان‌ها نارنجی #f37021، حاشیه‌ها #ddd، پس‌زمینه مالی #f9f9f9
Page: A4 Portrait
-->
<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: 11px; direction: rtl; text-align: right; }
.container { width: 210mm; min-height: 297mm; padding: 15mm; margin: 0 auto; }
.header { display: flex; align-items: center; margin-bottom: 15px; border-bottom: 2px solid #f37021; padding-bottom: 10px; }
.logo { width: 60px; height: auto; margin-left: 10px; }
.title-area { flex: 1; }
.title { font-size: 18px; font-weight: bold; color: #f37021; }
.subtitle { font-size: 12px; color: #666; }
.awb-number { font-size: 14px; font-weight: bold; color: #f37021; margin-top: 5px; }
.main-content { display: flex; gap: 15px; margin-bottom: 15px; }
.section { flex: 1; border: 1px solid #ddd; padding: 10px; }
.section-title { font-weight: bold; color: #f37021; margin-bottom: 8px; font-size: 12px; border-bottom: 1px solid #eee; padding-bottom: 3px; }
.row { margin-bottom: 4px; }
.label { font-weight: bold; color: #555; display: inline-block; width: 100px; }
.value { display: inline-block; }
.shipment-details { border: 1px solid #ddd; padding: 10px; margin-bottom: 15px; }
.shipment-title { font-weight: bold; color: #f37021; margin-bottom: 8px; font-size: 12px; }
.payment-section { border: 1px solid #ddd; padding: 10px; margin-bottom: 15px; background-color: #f9f9f9; }
.payment-title { font-weight: bold; color: #f37021; margin-bottom: 8px; font-size: 12px; }
.two-col { display: flex; gap: 20px; }
.col { flex: 1; }
.signature { margin-top: 20px; display: flex; justify-content: space-between; }
.signature-box { width: 45%; border-top: 1px solid #333; padding-top: 5px; text-align: center; font-size: 10px; }
.footer { margin-top: 15px; text-align: center; font-size: 9px; color: #999; border-top: 1px solid #ddd; padding-top: 10px; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<img src="{{ public_path('logo.png') }}" class="logo" alt="IFNEX Logo">
<div class="title-area">
<div class="title">Shipment Waybill</div>
<div class="awb-number">AWB No: {{ $shipment->awb_no }}</div>
</div>
</div>
<div class="main-content">
<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">Email:</span><span class="value">{{ $shipper['email'] }}</span></div>
<div class="row"><span class="label">Address:</span><span class="value">{{ $shipper['address'] }}</span></div>
<div class="row"><span class="label">City:</span><span class="value">{{ $shipper['city'] }}</span></div>
<div class="row"><span class="label">Zip:</span><span class="value">{{ $shipper['zip'] }}</span></div>
<div class="row"><span class="label">ID:</span><span class="value">{{ $shipper['id_number'] }}</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">Email:</span><span class="value">{{ $receiver['email'] }}</span></div>
<div class="row"><span class="label">Address:</span><span class="value">{{ $receiver['address'] }}</span></div>
<div class="row"><span class="label">City:</span><span class="value">{{ $receiver['city'] }}</span></div>
<div class="row"><span class="label">Zip:</span><span class="value">{{ $receiver['zip'] }}</span></div>
<div class="row"><span class="label">ID:</span><span class="value">{{ $receiver['id_number'] }}</span></div>
</div>
</div>
<div class="shipment-details">
<div class="shipment-title">SHIPMENT</div>
<div class="two-col">
<div class="col">
<div class="row"><span class="label">Gross Weight:</span><span class="value">{{ $shipment->weight }} kg</span></div>
<div class="row"><span class="label">Volumetric Weight:</span><span class="value">{{ $shipment->volumetric_weight }} kg</span></div>
<div class="row"><span class="label">Chargeable Weight:</span><span class="value">{{ $shipment->chargeable_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">Service:</span><span class="value">{{ $shipment->type?->label() }}</span></div>
<div class="row"><span class="label">Direction:</span><span class="value">{{ $shipment->direction?->label() }}</span></div>
</div>
<div class="col">
<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 class="row"><span class="label">Forwarder:</span><span class="value">{{ $shipment->forwarder }}</span></div>
<div class="row"><span class="label">Content:</span><span class="value">{{ $shipment->reason_for_export ?: 'General Goods' }}</span></div>
</div>
</div>
</div>
<div class="payment-section">
<div class="payment-title">PAYMENT</div>
<div class="row"><span class="label">Shipping Price (AED):</span><span class="value">{{ number_format($shipment->shipping_price ?? 0, 2) }}</span></div>
<div class="row"><span class="label">Extra Service (IRR):</span><span class="value">{{ number_format($shipment->extra_service ?? 0) }}</span></div>
<div class="row"><span class="label">Packing Cost (IRR):</span><span class="value">{{ number_format($shipment->packing_cost ?? 0) }}</span></div>
<div class="row"><span class="label">Domestic Pickup (IRR):</span><span class="value">{{ number_format($shipment->domestic_pickup ?? 0) }}</span></div>
<div class="row"><span class="label">Domestic Delivery (IRR):</span><span class="value">{{ number_format($shipment->domestic_delivery ?? 0) }}</span></div>
<div class="row"><span class="label">Warehousing (IRR):</span><span class="value">{{ number_format($shipment->warehousing_cost ?? 0) }}</span></div>
<div class="row"><span class="label">Discount (IRR):</span><span class="value">{{ number_format($shipment->discount ?? 0) }}</span></div>
<div class="row" style="font-weight: bold; color: #f37021; font-size: 12px;"><span class="label">Total Fee (IRR):</span><span class="value">{{ number_format($shipment->total_fee ?? 0) }}</span></div>
<div class="row" style="font-weight: bold; color: #f37021; font-size: 12px;"><span class="label">Net Dirham (AED):</span><span class="value">{{ number_format($shipment->net_dirham ?? 0, 2) }}</span></div>
</div>
<div class="signature">
<div class="signature-box">
Shipper Name & Signature<br>
Date: {{ now()->format('Y-m-d') }}
</div>
<div class="signature-box">
Track Your Shipment at:<br>
http://ifnex.net
</div>
</div>
<div class="footer">
IFNEX Logistics We Deliver Value | Generated on {{ now()->format('Y-m-d H:i') }}
</div>
</div>
</body>
</html>