donation/app/Views/print_addresses_form.php

174 lines
6.6 KiB
PHP

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shipping Label Template</title>
<?php if($action == 2) { ?>
<style>
.aside-content{
border-bottom: 3px solid #ffffff;
}
.invoice {
width: 48%;
height: 150px;
margin-left: 2px;
float: left;
page-break-inside: avoid;
padding-right: 2px !important;
border: 2px solid #FFFF00;
box-sizing: border-box;
}
.header {
text-align: center;
background:#fff!important;
}
.bill-details {
margin-bottom: 20px;
}
.customer-details {
margin-top: 20px;
}
.row {
clear: both;
}
.page-container {
width: 98%; /* Set the width of the A4 sheet */
margin: 1%; /* Add margin for spacing between A4 sheet and labels */
}
.business-logo {
max-width:175px;
height: auto;
width:100%;
}
</style>
</head>
<body>
<div class="page-container">
<?php
// Assuming $customerDetails is an array of customer details
$customerCount = count($customerDetails);
$labelsPerRow = 2;
for ($i = 0; $i < $customerCount; $i++) :
if ($i % $labelsPerRow == 0) {
echo '<div class="row aside-content">';
}
?>
<div class="invoice">
<div class="bill-details">
<!-- <div style="margin-bottom:5px;">To:</div> -->
<?= $customerDetails[$i]['customer_name'] ?>
<?= $customerDetails[$i]['address_1'] ?>,
<?= $customerDetails[$i]['address_2'] ?>,
<?= $customerDetails[$i]['city'] ?>,
<?= $customerDetails[$i]['state'] ?> -
<?= $customerDetails[$i]['postal_code'] ?>
<?php if($customerDetails[$i]['mobile_no'])
{
echo'Mobile : '.$customerDetails[$i]['mobile_no'];
} ?>
</div>
<div class="header">
<!-- <img src="https://vijayabharathambooks.com/wp-content/uploads/2021/09/vijaya-bharatham-logo-8pt.png" alt="Business Logo" class="business-logo"><br> -->
<div style="float:left; width:80px;margin-right:10px;"><img src="https://vbp.venbait.in/wp-content/uploads/2023/05/1111.png" alt="Business Logo" class="business-logo"/></div>
<div style="text-align:left;font-size:12px;">From<br/>
<?= $customerDetails[$i]['address'] ?>
<?= $customerDetails[$i]['city'] ?> - <?= $customerDetails[$i]['postal_code'] ?></div>
</div>
</div>
<?php
if (($i + 1) % $labelsPerRow == 0 || ($i + 1) == $customerCount) {
echo '</div>';
}
endfor; ?>
</div>
</body>
<?php } ?>
<?php if($action == 1) { ?>
<style>
body{
font-family:Helvetica!important;
line-height:24px;
color:#000!important;
}
.invoice {
width: 4in;
/* height: 6in; */
margin: 20px auto;
border: 1px solid #FFFF00;
padding:15px;
box-sizing: border-box;
}
.header {
text-align: center;
background:#fff!important;
}
.business-logo {
max-width:175px;
height: auto;
width:100%;
}
.bill-details {
margin-bottom: 20px;
}
.customer-details {
margin-top: 20px;
}
.row {
clear: both;
}
</style>
</head>
<body>
<div class="page-container">
<?php
// Assuming $customerDetails is an array of customer details
$customerCount = count($customerDetails);
for ($i = 0; $i < $customerCount; $i++) :
?>
<div class="invoice">
<div class="bill-details">
<!-- <div style="margin-bottom:5px;">To:</div> -->
<?= $customerDetails[$i]['customer_name'] ?>
<?= $customerDetails[$i]['address_1'] ?>,
<?= $customerDetails[$i]['address_2'] ?>,
<?= $customerDetails[$i]['city'] ?>,
<?= $customerDetails[$i]['state'] ?> -
<?= $customerDetails[$i]['postal_code'] ?>
<?php if($customerDetails[$i]['mobile_no'])
{
echo'Mobile : '.$customerDetails[$i]['mobile_no'];
} ?>
</div>
<div class="header">
<!-- <img src="https://vijayabharathambooks.com/wp-content/uploads/2021/09/vijaya-bharatham-logo-8pt.png" alt="Business Logo" class="business-logo"><br> -->
<!-- <div style="float:left; width:80px;margin-right:10px;"><img src="<?= base_url('public/uploads/vijayabharathampdf.png') ?>" alt="Business Logo" class="business-logo"/></div> -->
<div style="float:left; width:80px;margin-right:10px;"><img src="https://vbp.venbait.in/wp-content/uploads/2023/05/1111.png" alt="Business Logo" class="business-logo"/></div>
<div style="text-align:left;font-size:12px;">From<br/>
<?= $customerDetails[$i]['address'] ?>
<?= $customerDetails[$i]['city'] ?> - <?= $customerDetails[$i]['postal_code'] ?></div>
</div>
</div>
<?php endfor; ?>
</div>
</body>
<?php } ?>
</html>