style(pdf): overhaul layout and styling for document templates
Refactor AWB, Import Invoice, and Invoice Blade templates to improve rendering compatibility with Dompdf. Key changes: - Replace flexbox and box-sizing with table-based layouts to ensure consistent rendering in Dompdf. - Implement `@page` margins instead of container padding to prevent content overflow and clipping. - Update color palette to a modern navy and gray scheme. - Adjust font sizes and typography for better readability and professional appearance. - Fix width issues by using 100% width containers instead of fixed millimeter widths.
This commit is contained in:
parent
e5cc6a9d15
commit
d4b9e5bff5
@ -3,307 +3,420 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
/* ════════ Base Reset & Page ════════ */
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: DejaVu Sans, Arial, sans-serif;
|
||||
font-size: 10px;
|
||||
color: #000;
|
||||
background: #fff;
|
||||
font-size: 9px;
|
||||
color: #111827;
|
||||
line-height: 1.4;
|
||||
}
|
||||
/* ⚠️ Dompdf از box-sizing: border-box پشتیبانی نمیکند —
|
||||
width باید 100% ناحیه قابل چاپ باشد و حاشیهها با @page داده شوند؛
|
||||
width: 210mm + padding یعنی 230mm واقعی و بیرونزدگی از سمت راست. */
|
||||
@page { margin: 8mm 10mm; }
|
||||
.page {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
padding: 8mm;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* ─── HEADER ─── */
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 2px solid #f37021;
|
||||
padding-bottom: 6px;
|
||||
margin-bottom: 10px;
|
||||
/* ════════ Brand Colors ════════ */
|
||||
/* Navy: #1a1a2e | Orange accent: #f59e0b | Gray bg: #f3f4f6 */
|
||||
|
||||
/* ════════ Header ════════ */
|
||||
.header-table {
|
||||
width: 100%;
|
||||
table-layout: fixed; /* ✅ ستونها به عرض مشخص محدود میشوند */
|
||||
border-collapse: collapse;
|
||||
border-bottom: 3px solid #1a1a2e;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.logo-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
.header-table td {
|
||||
vertical-align: middle;
|
||||
padding: 4px 6px 8px 6px;
|
||||
word-wrap: break-word; /* ✅ متن طولانی میشکند */
|
||||
}
|
||||
.logo {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
.header-logo {
|
||||
width: 90px; /* ✅ کوچکتر شد */
|
||||
height: auto;
|
||||
}
|
||||
.brand {
|
||||
font-size: 18px;
|
||||
.header-brand {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #f37021;
|
||||
}
|
||||
.header-title {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
.header-title h1 {
|
||||
font-size: 18px;
|
||||
color: #000;
|
||||
margin-bottom: 2px;
|
||||
color: #1a1a2e;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.header-tagline {
|
||||
font-size: 9px;
|
||||
color: #666;
|
||||
font-style: italic;
|
||||
font-size: 8px;
|
||||
color: #6b7280;
|
||||
margin-top: 1px;
|
||||
}
|
||||
.header-title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #1a1a2e;
|
||||
text-align: center;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.header-awb {
|
||||
font-size: 11px; /* ✅ کوچکتر */
|
||||
font-weight: bold;
|
||||
color: #1a1a2e;
|
||||
text-align: right;
|
||||
letter-spacing: 1px; /* ✅ کمتر */
|
||||
}
|
||||
.header-date {
|
||||
font-size: 10px;
|
||||
font-size: 8px;
|
||||
color: #6b7280;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* ─── AWB BARCODE ─── */
|
||||
.awb-barcode-area {
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
padding: 8px;
|
||||
border: 2px solid #000;
|
||||
.header-barcode {
|
||||
text-align: right;
|
||||
}
|
||||
.awb-barcode-area img {
|
||||
height: 50px;
|
||||
}
|
||||
.awb-no-display {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
margin-top: 4px;
|
||||
.header-barcode img {
|
||||
max-width: 50mm; /* ✅ حداکثر عرض برای جا ماندن در ستون */
|
||||
height: 32px; /* ✅ کمی کوچکتر */
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* ─── MAIN SECTIONS ─── */
|
||||
.section-row {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.section {
|
||||
flex: 1;
|
||||
border: 1px solid #000;
|
||||
padding: 6px;
|
||||
}
|
||||
.section-title {
|
||||
background: #f37021;
|
||||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
/* ════════ Route Bar ════════ */
|
||||
.route-bar {
|
||||
width: 100%;
|
||||
background: #f3f4f6;
|
||||
border: 1px solid #d1d5db;
|
||||
padding: 4px 8px;
|
||||
margin-bottom: 6px;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
margin: -6px -6px 6px -6px;
|
||||
color: #1a1a2e;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
margin-bottom: 3px;
|
||||
.route-bar .route-arrow {
|
||||
color: #f59e0b;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
.route-bar .route-meta {
|
||||
float: left;
|
||||
font-size: 9px;
|
||||
color: #4b5563;
|
||||
font-weight: normal;
|
||||
}
|
||||
.label {
|
||||
width: 80px;
|
||||
font-weight: bold;
|
||||
color: #444;
|
||||
|
||||
/* ════════ Main Grid (2×2) ════════ */
|
||||
.grid-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.value {
|
||||
flex: 1;
|
||||
color: #000;
|
||||
.grid-table > tbody > tr > td {
|
||||
width: 50%;
|
||||
vertical-align: top;
|
||||
border: 1.5px solid #1a1a2e;
|
||||
padding: 0;
|
||||
}
|
||||
.from-to {
|
||||
.grid-table > tbody > tr > td.left {
|
||||
border-right: 0.5px solid #1a1a2e;
|
||||
}
|
||||
|
||||
/* ════════ Section Header (navy bar) ════════ */
|
||||
.section-header {
|
||||
background: #1a1a2e;
|
||||
color: #ffffff;
|
||||
padding: 4px 8px;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
color: #f37021;
|
||||
margin-bottom: 4px;
|
||||
letter-spacing: 1.5px;
|
||||
border-bottom: 1px solid #1a1a2e;
|
||||
}
|
||||
|
||||
/* ─── SHIPMENT & PAYMENT ─── */
|
||||
.shipment-row {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.shipment-section {
|
||||
flex: 1;
|
||||
border: 1px solid #000;
|
||||
padding: 6px;
|
||||
}
|
||||
.shipment-section.payment {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
/* ─── SHIPMENT DETAILS ─── */
|
||||
.shipment-details {
|
||||
border: 1px solid #000;
|
||||
padding: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.shipment-details table {
|
||||
/* ════════ Section Body (label-value rows) ════════ */
|
||||
.field-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 9px;
|
||||
}
|
||||
.shipment-details th,
|
||||
.shipment-details td {
|
||||
border: 1px solid #ccc;
|
||||
padding: 3px;
|
||||
text-align: left;
|
||||
.field-table td {
|
||||
padding: 2px 8px;
|
||||
vertical-align: top;
|
||||
border-bottom: 0.5px solid #e5e7eb;
|
||||
}
|
||||
.shipment-details th {
|
||||
background: #eee;
|
||||
.field-table td.label {
|
||||
width: 40%;
|
||||
color: #6b7280;
|
||||
font-weight: bold;
|
||||
}
|
||||
.field-table td.value {
|
||||
color: #111827;
|
||||
font-weight: normal;
|
||||
}
|
||||
.field-table tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* ─── NOTES ─── */
|
||||
.notes {
|
||||
border: 1px solid #000;
|
||||
padding: 6px;
|
||||
margin-bottom: 8px;
|
||||
/* ════════ Payment Total Row ════════ */
|
||||
.total-row td {
|
||||
background: #f59e0b !important;
|
||||
color: #ffffff !important;
|
||||
font-weight: bold !important;
|
||||
font-size: 11px !important;
|
||||
padding: 4px 8px !important;
|
||||
}
|
||||
|
||||
/* ════════ Shipment Details Table ════════ */
|
||||
.details-section {
|
||||
border: 1.5px solid #1a1a2e;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.details-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 8px;
|
||||
}
|
||||
.details-table th {
|
||||
background: #1a1a2e;
|
||||
color: #ffffff;
|
||||
padding: 3px 4px;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
border: 0.5px solid #1a1a2e;
|
||||
}
|
||||
.details-table td {
|
||||
padding: 2px 4px;
|
||||
border: 0.5px solid #d1d5db;
|
||||
color: #111827;
|
||||
}
|
||||
.details-table tr:nth-child(even) td {
|
||||
background: #f9fafb;
|
||||
}
|
||||
.details-total td {
|
||||
background: #f3f4f6 !important;
|
||||
font-weight: bold;
|
||||
color: #1a1a2e;
|
||||
}
|
||||
|
||||
/* ════════ Notes ════════ */
|
||||
.notes {
|
||||
border: 1px solid #d1d5db;
|
||||
padding: 5px 8px;
|
||||
margin-bottom: 6px;
|
||||
font-size: 7.5px;
|
||||
line-height: 1.5;
|
||||
background: #fffde7;
|
||||
color: #4b5563;
|
||||
background: #ffffff;
|
||||
}
|
||||
.notes strong {
|
||||
color: #f37021;
|
||||
.notes-title {
|
||||
font-weight: bold;
|
||||
color: #1a1a2e;
|
||||
font-size: 8px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* ─── SIGNATURE ─── */
|
||||
.signature-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
/* ════════ Signature ════════ */
|
||||
.signature-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.signature-box {
|
||||
width: 45%;
|
||||
.signature-table td {
|
||||
width: 50%;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
font-size: 9px;
|
||||
font-size: 8px;
|
||||
color: #6b7280;
|
||||
}
|
||||
.signature-line {
|
||||
border-top: 1px solid #000;
|
||||
margin-top: 25px;
|
||||
.sig-line {
|
||||
border-top: 1px solid #1a1a2e;
|
||||
margin-top: 28px;
|
||||
padding-top: 3px;
|
||||
font-size: 8px;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
/* ─── FOOTER ─── */
|
||||
/* ════════ Footer ════════ */
|
||||
.footer {
|
||||
border-top: 2px solid #f37021;
|
||||
padding-top: 5px;
|
||||
border-top: 2px solid #1a1a2e;
|
||||
padding-top: 4px;
|
||||
text-align: center;
|
||||
font-size: 9px;
|
||||
font-size: 8px;
|
||||
color: #6b7280;
|
||||
}
|
||||
.footer-brand {
|
||||
color: #f37021;
|
||||
color: #1a1a2e;
|
||||
font-weight: bold;
|
||||
}
|
||||
.track-url {
|
||||
font-size: 10px;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
/* ─── UTILITY ─── */
|
||||
.total-row {
|
||||
background: #f37021;
|
||||
color: #fff;
|
||||
.footer-track {
|
||||
font-size: 9px;
|
||||
color: #f59e0b;
|
||||
font-weight: bold;
|
||||
margin: 1px 0;
|
||||
}
|
||||
.total-row .label,
|
||||
.total-row .value {
|
||||
color: #fff;
|
||||
.footer-meta {
|
||||
font-size: 7px;
|
||||
color: #9ca3af;
|
||||
margin-top: 2px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<!-- HEADER -->
|
||||
<div class="header">
|
||||
<div class="logo-area">
|
||||
<img src="{{ public_path('logo.png') }}" class="logo" alt="IFNEX">
|
||||
<div class="brand">IFNEx</div>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<h1>Shipment Waybill</h1>
|
||||
<div class="header-tagline">We Deliver Value</div>
|
||||
</div>
|
||||
<div class="header-date">
|
||||
Date: {{ $shipment->created_at?->format('m/d/Y') }}
|
||||
</div>
|
||||
|
||||
<!-- ════════ HEADER ════════ -->
|
||||
<table class="header-table">
|
||||
<tr>
|
||||
<td style="width: 25%;">
|
||||
<img src="{{ public_path('images/ifnex-logo.png') }}" class="header-logo" alt="IFNEX">
|
||||
</td>
|
||||
<td style="width: 38%;" align="center">
|
||||
<div class="header-brand">IFNEX</div>
|
||||
<div class="header-tagline">We Deliver Value</div>
|
||||
<div class="header-title" style="margin-top:4px;">SHIPMENT WAYBILL</div>
|
||||
</td>
|
||||
<td style="width: 37%;" class="header-barcode">
|
||||
@if($barcode_base64)
|
||||
<img src="{{ $barcode_base64 }}" alt="barcode"><br>
|
||||
@endif
|
||||
<div class="header-awb">{{ $shipment->awb_no }}</div>
|
||||
<div class="header-date">Date: {{ $shipment->created_at?->format('m/d/Y') }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- ════════ ROUTE BAR ════════ -->
|
||||
<div class="route-bar">
|
||||
<span class="route-meta">
|
||||
Service: {{ $service_label }} | Type: {{ $type_label }}
|
||||
</span>
|
||||
From: {{ strtoupper($shipment->fromCountry?->name ?? '—') }} ({{ $shipment->fromCountry?->iso_code }})
|
||||
<span class="route-arrow"> → </span>
|
||||
To: {{ strtoupper($shipment->toCountry?->name ?? '—') }} ({{ $shipment->toCountry?->iso_code }})
|
||||
</div>
|
||||
|
||||
<!-- AWB BARCODE -->
|
||||
<div class="awb-barcode-area">
|
||||
@if($barcode_base64)
|
||||
<img src="{{ $barcode_base64 }}" alt="barcode">
|
||||
@endif
|
||||
<div class="awb-no-display">{{ $shipment->awb_no }}</div>
|
||||
</div>
|
||||
<!-- ════════ GRID 2×2: Shipper / Receiver ════════ -->
|
||||
<table class="grid-table">
|
||||
<tr>
|
||||
<!-- SHIPPER -->
|
||||
<td class="left">
|
||||
<div class="section-header">SHIPPER</div>
|
||||
<table class="field-table">
|
||||
@if($shipper['company'])
|
||||
<tr><td class="label">Company</td><td class="value">{{ $shipper['company'] }}</td></tr>
|
||||
@endif
|
||||
<tr><td class="label">Contact Name</td><td class="value">{{ $shipper['name'] ?: '—' }}</td></tr>
|
||||
<tr><td class="label">Phone</td><td class="value">{{ $shipper['phone'] ?: '—' }}</td></tr>
|
||||
@if($shipper['email'])
|
||||
<tr><td class="label">Email</td><td class="value">{{ $shipper['email'] }}</td></tr>
|
||||
@endif
|
||||
<tr><td class="label">Address</td><td class="value">{{ $shipper['address'] ?: '—' }}</td></tr>
|
||||
@if($shipper['city'])
|
||||
<tr><td class="label">City</td><td class="value">{{ $shipper['city'] }}</td></tr>
|
||||
@endif
|
||||
@if($shipper['zip'])
|
||||
<tr><td class="label">Zip Code</td><td class="value">{{ $shipper['zip'] }}</td></tr>
|
||||
@endif
|
||||
@if($shipper['id_number'])
|
||||
<tr><td class="label">ID Number</td><td class="value">{{ $shipper['id_number'] }}</td></tr>
|
||||
@endif
|
||||
</table>
|
||||
</td>
|
||||
<!-- RECEIVER -->
|
||||
<td>
|
||||
<div class="section-header">RECEIVER</div>
|
||||
<table class="field-table">
|
||||
@if($receiver['company'])
|
||||
<tr><td class="label">Company</td><td class="value">{{ $receiver['company'] }}</td></tr>
|
||||
@endif
|
||||
<tr><td class="label">Contact Name</td><td class="value">{{ $receiver['name'] ?: '—' }}</td></tr>
|
||||
<tr><td class="label">Phone</td><td class="value">{{ $receiver['phone'] ?: '—' }}</td></tr>
|
||||
@if($receiver['email'])
|
||||
<tr><td class="label">Email</td><td class="value">{{ $receiver['email'] }}</td></tr>
|
||||
@endif
|
||||
<tr><td class="label">Address</td><td class="value">{{ $receiver['address'] ?: '—' }}</td></tr>
|
||||
@if($receiver['city'])
|
||||
<tr><td class="label">City</td><td class="value">{{ $receiver['city'] }}</td></tr>
|
||||
@endif
|
||||
@if($receiver['zip'])
|
||||
<tr><td class="label">Zip Code</td><td class="value">{{ $receiver['zip'] }}</td></tr>
|
||||
@endif
|
||||
@if($receiver['id_number'])
|
||||
<tr><td class="label">ID Number</td><td class="value">{{ $receiver['id_number'] }}</td></tr>
|
||||
@endif
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- SHIPPER & RECEIVER -->
|
||||
<div class="section-row">
|
||||
<div class="section">
|
||||
<div class="section-title">SHIPPER</div>
|
||||
<div class="from-to">From: {{ $shipper['city'] }}, {{ $shipment->fromCountry?->name }} ({{ $shipment->fromCountry?->iso_code }})</div>
|
||||
<div class="row"><span class="label">Company Name:</span><span class="value">{{ $shipper['company'] ?: '—' }}</span></div>
|
||||
<div class="row"><span class="label">Contact Name:</span><span class="value">{{ $shipper['name'] }}</span></div>
|
||||
<div class="row"><span class="label">Tel / Mob:</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">ID Number:</span><span class="value">{{ $shipper['id_number'] ?: '—' }}</span></div>
|
||||
<div class="row"><span class="label">Zip Code:</span><span class="value">{{ $shipper['zip'] ?: '—' }}</span></div>
|
||||
</div>
|
||||
<!-- ════════ GRID 2×2: Shipment / Payment ════════ -->
|
||||
<table class="grid-table">
|
||||
<tr>
|
||||
<!-- SHIPMENT -->
|
||||
<td class="left">
|
||||
<div class="section-header">SHIPMENT</div>
|
||||
<table class="field-table">
|
||||
<tr><td class="label">Gross Weight</td><td class="value">{{ $shipment->weight ?: '—' }} Kg</td></tr>
|
||||
@if($shipment->dimensions)
|
||||
<tr><td class="label">Dimensions</td><td class="value">{{ $shipment->dimensions }} cm</td></tr>
|
||||
@endif
|
||||
@if($shipment->volumetric_weight)
|
||||
<tr><td class="label">Volumetric Weight</td><td class="value">{{ $shipment->volumetric_weight }} Kg</td></tr>
|
||||
@endif
|
||||
<tr><td class="label">Chargeable Weight</td><td class="value">{{ $shipment->chargeable_weight ?: max($shipment->weight ?? 0, $shipment->volumetric_weight ?? 0) }} Kg</td></tr>
|
||||
@if($invoice_total_usd > 0)
|
||||
<tr><td class="label">Declared Value</td><td class="value">{{ number_format($invoice_total_usd, 0) }} USD</td></tr>
|
||||
@endif
|
||||
@php
|
||||
$contentDesc = $items->isNotEmpty()
|
||||
? $items->pluck('description')->implode(', ')
|
||||
: ($shipment->content_description ?: $shipment->reason_for_export ?: 'General Goods');
|
||||
@endphp
|
||||
<tr><td class="label">Content</td><td class="value">{{ $contentDesc }}</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- PAYMENT -->
|
||||
<td>
|
||||
<div class="section-header">PAYMENT</div>
|
||||
<table class="field-table">
|
||||
<tr><td class="label">Shipping Price</td><td class="value">{{ $shipment->shipping_price ? number_format($shipment->shipping_price, 0) : '—' }}</td></tr>
|
||||
@if(($shipment->extra_service ?? 0) > 0)
|
||||
<tr><td class="label">Extra Service</td><td class="value">{{ number_format($shipment->extra_service) }}</td></tr>
|
||||
@endif
|
||||
@if(($shipment->domestic_pickup ?? 0) > 0)
|
||||
<tr><td class="label">Domestic Pickup</td><td class="value">{{ number_format($shipment->domestic_pickup) }}</td></tr>
|
||||
@endif
|
||||
@if(($shipment->packing_cost ?? 0) > 0)
|
||||
<tr><td class="label">Packing Cost</td><td class="value">{{ number_format($shipment->packing_cost) }}</td></tr>
|
||||
@endif
|
||||
@if(($shipment->domestic_delivery ?? 0) > 0)
|
||||
<tr><td class="label">Domestic Delivery</td><td class="value">{{ number_format($shipment->domestic_delivery) }}</td></tr>
|
||||
@endif
|
||||
@if(($shipment->warehousing_cost ?? 0) > 0)
|
||||
<tr><td class="label">Warehousing</td><td class="value">{{ number_format($shipment->warehousing_cost) }}</td></tr>
|
||||
@endif
|
||||
@if(($shipment->discount ?? 0) > 0)
|
||||
<tr><td class="label">Discount</td><td class="value" style="color:#dc2626;">-{{ number_format($shipment->discount) }}</td></tr>
|
||||
@endif
|
||||
<tr class="total-row"><td class="label">TOTAL FEE</td><td class="value">{{ number_format($shipment->total_fee ?? 0) }} IRR</td></tr>
|
||||
@if($shipment->cod_amount)
|
||||
<tr><td class="label">Cash on Delivery</td><td class="value">{{ number_format($shipment->cod_amount, 0) }} AED</td></tr>
|
||||
@endif
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">RECEIVER</div>
|
||||
<div class="from-to">To: {{ $receiver['city'] }}, {{ $shipment->toCountry?->name }} ({{ $shipment->toCountry?->iso_code }})</div>
|
||||
<div class="row"><span class="label">Company Name:</span><span class="value">{{ $receiver['company'] ?: '—' }}</span></div>
|
||||
<div class="row"><span class="label">Contact Name:</span><span class="value">{{ $receiver['name'] }}</span></div>
|
||||
<div class="row"><span class="label">Tel / Mobile:</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 Code:</span><span class="value">{{ $receiver['zip'] ?: '—' }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SHIPMENT & PAYMENT -->
|
||||
<div class="shipment-row">
|
||||
<div class="shipment-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">Dimensions:</span><span class="value">{{ $shipment->dimensions ?: '—' }} (cm)</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 ?: max($shipment->weight, $shipment->volumetric_weight) }} (Kg)</span></div>
|
||||
<div class="row"><span class="label">Value:</span><span class="value">{{ $invoice_total_usd > 0 ? number_format($invoice_total_usd, 0) . ' (USD)' : '—' }}</span></div>
|
||||
<div class="row"><span class="label">Service:</span><span class="value">{{ $service_label }}</span></div>
|
||||
<div class="row"><span class="label">Type:</span><span class="value">{{ $type_label }}</span></div>
|
||||
<div class="row"><span class="label">Content:</span><span class="value">{{ $shipment->content_description ?: $shipment->reason_for_export ?: 'General Goods' }}</span></div>
|
||||
</div>
|
||||
|
||||
<div class="shipment-section payment">
|
||||
<div class="section-title">PAYMENT</div>
|
||||
<div class="row"><span class="label">Shipping Price:</span><span class="value">{{ $shipment->shipping_price ? number_format($shipment->shipping_price, 2) : '—' }}</span></div>
|
||||
<div class="row"><span class="label">Extra Service:</span><span class="value">{{ number_format($shipment->extra_service ?? 0) }}</span></div>
|
||||
<div class="row"><span class="label">Domestic Pickup:</span><span class="value">{{ number_format($shipment->domestic_pickup ?? 0) }}</span></div>
|
||||
<div class="row"><span class="label">Packing Cost:</span><span class="value">{{ number_format($shipment->packing_cost ?? 0) }}</span></div>
|
||||
<div class="row"><span class="label">Domestic Delivery:</span><span class="value">{{ number_format($shipment->domestic_delivery ?? 0) }}</span></div>
|
||||
<div class="row"><span class="label">Warehousing:</span><span class="value">{{ number_format($shipment->warehousing_cost ?? 0) }}</span></div>
|
||||
<div class="row"><span class="label">Discount:</span><span class="value">{{ number_format($shipment->discount ?? 0) }}</span></div>
|
||||
<div class="row total-row"><span class="label">Total Fee:</span><span class="value">{{ number_format($shipment->total_fee ?? 0) }} IRR</span></div>
|
||||
<div class="row"><span class="label">Cash on Delivery:</span><span class="value">{{ $shipment->cod_amount ? number_format($shipment->cod_amount, 2) . ' AED' : '—' }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SHIPMENT DETAILS (Items) -->
|
||||
<!-- ════════ SHIPMENT DETAILS (Items table — only if items exist) ════════ -->
|
||||
@if($items->isNotEmpty())
|
||||
<div class="shipment-details">
|
||||
<div class="section-title" style="background: #f37021; color: #fff; padding: 3px 6px; margin: -6px -6px 6px -6px;">Shipment Details</div>
|
||||
<table>
|
||||
<div class="details-section">
|
||||
<div class="section-header">SHIPMENT DETAILS</div>
|
||||
<table class="details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Description</th>
|
||||
<th>H.S. Code</th>
|
||||
<th>Qty</th>
|
||||
<th>Unit Price (USD)</th>
|
||||
<th>Total (USD)</th>
|
||||
<th style="width: 5%;">No</th>
|
||||
<th style="width: 40%;">Description</th>
|
||||
<th style="width: 15%;">H.S. Code</th>
|
||||
<th style="width: 10%;">Qty</th>
|
||||
<th style="width: 15%;">Unit Price (USD)</th>
|
||||
<th style="width: 15%;">Total (USD)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -311,14 +424,14 @@
|
||||
<tr>
|
||||
<td>{{ $item->row_number }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>{{ $item->hs_code }}</td>
|
||||
<td>{{ $item->hs_code ?: '—' }}</td>
|
||||
<td>{{ $item->quantity }}</td>
|
||||
<td>{{ number_format($item->unit_price, 2) }}</td>
|
||||
<td>{{ number_format($item->total_usd, 2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr style="background: #eee; font-weight: bold;">
|
||||
<td colspan="5" style="text-align: right;">Total Invoice Amount in USD:</td>
|
||||
<tr class="details-total">
|
||||
<td colspan="5" style="text-align: right;">Total Invoice Amount (USD):</td>
|
||||
<td>{{ number_format($invoice_total_usd, 2) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -326,34 +439,35 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- NOTES -->
|
||||
<!-- ════════ NOTES ════════ -->
|
||||
<div class="notes">
|
||||
<strong>Please note that:</strong><br>
|
||||
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.<br>
|
||||
Only Consignee is aware of the importing rules in the destination and consignee is the person who is in contact with the shipper.<br>
|
||||
The Courier Company cannot guarantee the clearance since All shipments are subjected to customs approval at Origin and Destination.
|
||||
<div class="notes-title">⚠ Terms & Conditions</div>
|
||||
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.
|
||||
</div>
|
||||
|
||||
<!-- SIGNATURE -->
|
||||
<div class="signature-row">
|
||||
<div class="signature-box">
|
||||
Shipper Name & Signature:
|
||||
<div class="signature-line"></div>
|
||||
</div>
|
||||
<div class="signature-box">
|
||||
Date:
|
||||
<div class="signature-line">...../...../..........</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ════════ SIGNATURE ════════ -->
|
||||
<table class="signature-table">
|
||||
<tr>
|
||||
<td style="border-left: 1px solid #e5e7eb;">
|
||||
Shipper Name & Signature
|
||||
<div class="sig-line"></div>
|
||||
</td>
|
||||
<td>
|
||||
Date
|
||||
<div class="sig-line">...../...../..........</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- FOOTER -->
|
||||
<!-- ════════ FOOTER ════════ -->
|
||||
<div class="footer">
|
||||
<div class="footer-brand">IFNEx Logistics — We Deliver Value</div>
|
||||
<div class="track-url">Track Your Shipment at: http://ifnex.net</div>
|
||||
<div style="margin-top: 3px; font-size: 8px; color: #999;">
|
||||
AWB: {{ $shipment->awb_no }} | Generated: {{ now()->format('Y-m-d H:i') }}
|
||||
<div class="footer-brand">IFNEX LOGISTICS — We Deliver Value</div>
|
||||
<div class="footer-track">Track Your Shipment: http://ifnex.net</div>
|
||||
<div class="footer-meta">
|
||||
AWB: {{ $shipment->awb_no }} | Generated: {{ now()->format('Y-m-d H:i') }} | © {{ date('Y') }} IFNEX Logistics
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@ -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 ─── */
|
||||
|
||||
@ -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 ─── */
|
||||
|
||||
BIN
04_Laravel/storage/awb-fixed.pdf
Normal file
BIN
04_Laravel/storage/awb-fixed.pdf
Normal file
Binary file not shown.
BIN
04_Laravel/storage/invoice-fixed.pdf
Normal file
BIN
04_Laravel/storage/invoice-fixed.pdf
Normal file
Binary file not shown.
BIN
04_Laravel/storage/label-fixed.pdf
Normal file
BIN
04_Laravel/storage/label-fixed.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user