ifnex/04_Laravel/resources/views/pdfs/label.blade.php
Kazem Alghasi f330d13620 refactor(import): enhance shipping rates import and refine PDF layouts
Improve the reliability and usability of the shipping rates import
process and update PDF document templates for better visual fidelity.

- Enhance `ImportShippingRates` command with `--clear` and `--dry-run`
  options to prevent accidental data loss and allow safe testing.
- Implement error handling and statistics tracking in `ShippingRatesImport`
  to capture skipped rows and import errors.
- Refactor AWB and Label PDF templates to use A4 standard dimensions
  and improved CSS layouts.
- Integrate company logo into PDF headers.
- Add a new pricing inquiry page and navigation link.
- Clean up obsolete test scripts.
2026-08-04 09:47:22 +03:30

90 lines
4.8 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: 12px; direction: rtl; text-align: right; }
.page { width: 210mm; min-height: 297mm; padding: 10mm; margin: 0 auto; }
.label-box {
border: 2px solid #333;
padding: 15px;
margin-bottom: 20px;
page-break-inside: avoid;
}
.header { display: flex; align-items: center; border-bottom: 2px solid #f37021; padding-bottom: 10px; margin-bottom: 15px; }
.logo { width: 50px; height: auto; margin-left: 10px; }
.company-info { flex: 1; }
.company-name { font-size: 16px; font-weight: bold; color: #f37021; }
.awb-display { font-size: 18px; font-weight: bold; background: #f37021; color: white; padding: 5px 15px; display: inline-block; margin-top: 5px; }
.grid { display: flex; flex-wrap: wrap; gap: 15px; }
.col { flex: 1; min-width: 45%; }
.section-title { font-weight: bold; color: #f37021; font-size: 11px; margin-bottom: 8px; text-transform: uppercase; }
.row { margin-bottom: 5px; }
.label { font-weight: bold; color: #555; display: inline-block; width: 100px; }
.value { display: inline-block; }
.shipment-info { background-color: #f9f9f9; padding: 10px; border: 1px solid #ddd; margin-top: 15px; }
.shipment-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.shipment-item { flex: 1; min-width: 45%; }
.footer { margin-top: 15px; text-align: center; font-size: 10px; color: #666; border-top: 1px solid #ddd; padding-top: 10px; }
</style>
</head>
<body>
<div class="page">
<div class="label-box">
<div class="header">
<img src="{{ public_path('logo.png') }}" class="logo" alt="IFNEX Logo">
<div class="company-info">
<div class="company-name">IFNEX LOGISTICS</div>
<div class="awb-display">{{ $shipment->awb_no }}</div>
</div>
</div>
<div class="grid">
<div class="col">
<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="col">
<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>
<div class="shipment-info">
<div class="section-title">SHIPMENT DETAILS</div>
<div class="shipment-grid">
<div class="shipment-item">
<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>
<div class="shipment-item">
<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">Service:</span><span class="value">{{ $shipment->type?->label() }}</span></div>
</div>
</div>
</div>
<div class="footer">
IFNEX Logistics | We Deliver Value | {{ $shipment->awb_no }}
</div>
</div>
</div>
</body>
</html>