ss
This commit is contained in:
parent
b12197a9ce
commit
c4dde91fe7
@ -141,13 +141,13 @@ public function download_details()
|
|||||||
|
|
||||||
$configA4 = [
|
$configA4 = [
|
||||||
'mode' => 'utf-8',
|
'mode' => 'utf-8',
|
||||||
'format' => 'A4',
|
'format' => [101.6 * 2, 152.4 * 4], // 2x4 inches for each label
|
||||||
'default_font_size' => 12,
|
'default_font_size' => 12,
|
||||||
'default_font' => 'Arial',
|
'default_font' => 'Arial',
|
||||||
'margin_left' => 10, // Adjusted margin for better fit
|
'margin_left' => 0,
|
||||||
'margin_right' => 10, // Adjusted margin for better fit
|
'margin_right' => 0,
|
||||||
'margin_top' => 10, // Adjusted margin for better fit
|
'margin_top' => 0,
|
||||||
'margin_bottom' => 10, // Adjusted margin for better fit
|
'margin_bottom' => 0,
|
||||||
'margin_header' => 0,
|
'margin_header' => 0,
|
||||||
'margin_footer' => 0,
|
'margin_footer' => 0,
|
||||||
'orientation' => 'P', // Portrait
|
'orientation' => 'P', // Portrait
|
||||||
@ -167,8 +167,9 @@ public function download_details()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($customerDetails)) {
|
if (!empty($customerDetails)) {
|
||||||
$html = view('print_addresses_form', ['customerDetails' => $customerDetails , 'action' => $action ]);
|
$html = view('print_addresses_form', ['customerDetails' => $customerDetails , 'action' => $action , 'pdf' => $pdf]);
|
||||||
// Add the current scheme's details to the PDF
|
// Add the current scheme's details to the PDF
|
||||||
|
// echo $html;die;
|
||||||
// $pdf->AddPage();
|
// $pdf->AddPage();
|
||||||
$pdf->WriteHTML($html);
|
$pdf->WriteHTML($html);
|
||||||
// Set the PDF filename
|
// Set the PDF filename
|
||||||
|
|||||||
@ -6,20 +6,17 @@
|
|||||||
|
|
||||||
<?php if($action == 2) { ?>
|
<?php if($action == 2) { ?>
|
||||||
<style>
|
<style>
|
||||||
|
.aside-content{
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
}
|
||||||
.invoice {
|
.invoice {
|
||||||
width: 48%; /* Set the width of each label */
|
width: 48%;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
/* height: 300px; Set the height of each label */
|
margin-left: 2px;
|
||||||
/* box-sizing: border-box; */
|
|
||||||
border: 1px solid #000;
|
|
||||||
/* margin: 1%; Add margin for spacing between labels */
|
|
||||||
float: left;
|
float: left;
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
padding-left : 5px;
|
padding-right: 2px !important;
|
||||||
/* margin: 20px auto; */
|
border: 2px solid #FFFF00;
|
||||||
/* border: 1px solid #000; */
|
|
||||||
border: 1px solid #FFFF00
|
|
||||||
/* padding:10px; */
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
@ -53,47 +50,44 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<?php
|
<?php
|
||||||
// Assuming $customerDetails is an array of customer details
|
// Assuming $customerDetails is an array of customer details
|
||||||
$customerCount = count($customerDetails);
|
$customerCount = count($customerDetails);
|
||||||
$labelsPerRow = 2;
|
$labelsPerRow = 2;
|
||||||
for ($i = 0; $i < $customerCount; $i++) :
|
for ($i = 0; $i < $customerCount; $i++) :
|
||||||
if ($i % $labelsPerRow == 0) {
|
if ($i % $labelsPerRow == 0) {
|
||||||
echo '<div class="row">';
|
echo '<div class="row aside-content">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="invoice">
|
<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">
|
||||||
<div class="bill-details">
|
<!-- <img src="https://vijayabharathambooks.com/wp-content/uploads/2021/09/vijaya-bharatham-logo-8pt.png" alt="Business Logo" class="business-logo"><br> -->
|
||||||
<!-- <div style="margin-bottom:5px;">To:</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>
|
||||||
<?= $customerDetails[$i]['customer_name'] ?>
|
<div style="text-align:left;font-size:12px;">From<br/>
|
||||||
<?= $customerDetails[$i]['address_1'] ?>,
|
<?= $customerDetails[$i]['address'] ?>
|
||||||
<?= $customerDetails[$i]['address_2'] ?>,
|
<?= $customerDetails[$i]['city'] ?> - <?= $customerDetails[$i]['postal_code'] ?></div>
|
||||||
<?= $customerDetails[$i]['city'] ?>,
|
</div>
|
||||||
<?= $customerDetails[$i]['state'] ?> -
|
</div>
|
||||||
<?= $customerDetails[$i]['postal_code'] ?>
|
<?php
|
||||||
<?php if($customerDetails[$i]['mobile_no'])
|
if (($i + 1) % $labelsPerRow == 0 || ($i + 1) == $customerCount) {
|
||||||
{
|
echo '</div>';
|
||||||
echo'Mobile : '.$customerDetails[$i]['mobile_no'];
|
}
|
||||||
} ?>
|
endfor; ?>
|
||||||
</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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -108,7 +102,7 @@
|
|||||||
width: 4in;
|
width: 4in;
|
||||||
/* height: 6in; */
|
/* height: 6in; */
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
border: 1px solid #000;
|
border: 1px solid #FFFF00;
|
||||||
padding:15px;
|
padding:15px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user