vb_book/app/Views/address_pdf_landscape_template.php
2024-12-09 12:27:33 +05:30

88 lines
3.3 KiB
PHP
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shipping Label Template</title>
<style>
body {
font-family: Helvetica, Arial, sans-serif;
box-sizing: border-box;
}
.label-container {
/* margin: 30px;
padding: 30px;
/* border: 2px solid #000;
width: 100%;
height: 100%; */
/* position: relative; */
}
.from-address, .to-address {
/* margin-bottom: 20px; */
}
.from-address {
text-align: left;
float: left;
width: 100%;
font-size: 11px;
}
.to-address {
float: right;
position: absolute;
width: 48%;
/* clear: both; */
/* padding-left: 90%; */
margin-top: 80px;
}
</style>
</head>
<body>
<?php foreach ($invoiceData as $value): ?>
<div class="label-container">
<table width="100%" style="border-collapse: collapse;">
<tr>
<td width = "40%"><img src="<?= base_url() . 'public/uploads/Vijayabharatham_logo_1.png' ?>" alt="" height="55"></td>
<td width="60%" style="text-align: right;font-size: 11px;">
<?php $label = $value->invoice_number == $value->wp_api_order_id ? "Order Number :" : "Invoice Number :"; ?>
<b><?= $label; ?></b> <?= $value->invoice_number; ?>
</td>
</tr><tr>
<td></td>
</tr>
<tr>
<td style="text-align: left;font-size: 11px;"><strong>From:</strong></td>
</tr>
</table>
<!-- From Address on the left -->
<div class="from-address">
<?= $value->company_name; ?><br>
<?= $value->company_address . ","; ?><br>
<?= $value->company_city; ?> - <?= $value->company_postal_code . ","; ?><br>
<?= $value->company_state . "."; ?><br>
<?= $value->company_mobile_no; ?>
</div>
<!-- To Address -->
<div class="to-address">
<strong>To:</strong><br>
<?= $value->customer_name ?><br>
<?php if($value->customer_ship_address && ($value->saddr_id !== null || $value->saddr_id !== '')){ ?>
<?= $value->customer_ship_address ? $value->customer_ship_address . ", <br>" : "" ?>
<?= $value->customer_ship_city ? $value->customer_ship_city . "&nbsp;" : "" ?>
<?= $value->customer_ship_postal_code ? " - " . $value->customer_ship_postal_code . "<br>" : ""; ?>
<?= $value->customer_ship_state ? $value->customer_ship_state . ". <br>" : "" ?>
<?php }else if ($value->saddr_id === null || $value->saddr_id === '') {
echo $value->shipping_address ? $value->shipping_address.'<br>' : '';
} ?>
<?= $value->mobile_no ? "Mobile : " . $value->mobile_no . "." : "" ?>
</div>
<div style="clear: both;"></div>
</div>
<?php endforeach; ?>
</body>
</html>