214 lines
6.1 KiB
PHP
214 lines
6.1 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>
|
|
/* Add your CSS styles here to format the invoice for mPDF */
|
|
body {
|
|
|
|
font-family: 'Times New Roman', Times, sans-serif;
|
|
|
|
font-size: 12px; /* Change this value to your desired font size */
|
|
}
|
|
|
|
/* Style for the main table with border */
|
|
table.main-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border: 1px solid black; /* Add a border around the entire invoice */
|
|
}
|
|
|
|
table.main-table th,
|
|
table.main-table td {
|
|
border: none; /* Remove borders from all cells inside the main table */
|
|
padding: 8px;
|
|
}
|
|
|
|
/* Style for the table containing business details */
|
|
table.business-details-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
table.business-details-table td {
|
|
padding: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
/* Style for the business logo and title */
|
|
.business-logo-container {
|
|
text-align: right;
|
|
}
|
|
|
|
img.business-logo {
|
|
max-width: 200px; /* Adjust the size of the logo */
|
|
float: right;
|
|
position: relative;
|
|
left: 45%;
|
|
}
|
|
|
|
/* Style for the business name */
|
|
.business-name {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
/* Style for the table containing invoice info */
|
|
table.invoice-info-table {
|
|
width: 100%;
|
|
font-size: large;
|
|
}
|
|
|
|
table.invoice-info-table th,
|
|
table.invoice-info-table td {
|
|
text-align: right;
|
|
}
|
|
|
|
/* Style for the addresses table */
|
|
table.addresses-table {
|
|
width: 100%;
|
|
}
|
|
|
|
table.addresses-table th {
|
|
text-align: left;
|
|
}
|
|
|
|
/* Style for the billing and shipping addresses */
|
|
.billing-address {
|
|
width: 50%;
|
|
font-size: x-large;
|
|
}
|
|
|
|
/* Style for the invoice-related table */
|
|
table.invoice-related-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
table.invoice-related-table th,
|
|
table.invoice-related-table td {
|
|
border: none; /* Remove borders from all cells in the invoice items table */
|
|
padding: 8px;
|
|
text-align: center; /* Center-align text in cells */
|
|
}
|
|
|
|
table.invoice-related-table th {
|
|
background-color: #f2f2f2;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Style for the business stamp and terms */
|
|
.business-stamp, .terms {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
}
|
|
.subtotal-table {
|
|
width: 100%;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.subtotal-table table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border: 1px solid black; /* Add a border around the subtotal table */
|
|
}
|
|
|
|
.subtotal-table th,
|
|
.subtotal-table td {
|
|
border: none; /* Remove borders from cells inside the subtotal table */
|
|
padding: 8px;
|
|
text-align: right;
|
|
}
|
|
|
|
.subtotal-table th {
|
|
background-color: #f2f2f2;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.subtotal-table td:last-child {
|
|
font-weight: bold; /* Make the last column (total values) bold */
|
|
}
|
|
td.invoice-number {
|
|
font-size: 18px; /* Increase font size to your desired value */
|
|
/* Highlight background color */
|
|
font-weight: bold; /* Make the text bold */
|
|
}
|
|
|
|
.org-details{
|
|
position: relative;
|
|
bottom: 75px;
|
|
}
|
|
|
|
.org-receipt{
|
|
position: relative;
|
|
top: 60px;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<table class="main-table">
|
|
<tr>
|
|
<td>
|
|
<table class="business-details-table">
|
|
<?php foreach ($data as $value) : ?>
|
|
<tr>
|
|
<div class="business-logo-container">
|
|
<img src="https://vijayabharathambooks.com/wp-content/uploads/2021/09/vijaya-bharatham-logo-8pt.png" alt="Business Logo" class="business-logo">
|
|
</div>
|
|
</tr>
|
|
<tr>
|
|
<td class= "org-details">
|
|
<p><h1><?= $value->title;?></h1></p>
|
|
<span><?= $value->address ?>,<br><?= $value->city ?>, <?= $value->state ?>, <?= $value->postal_code ?> . </span><br>
|
|
<span>email : <?= $value->email ?></span><br>
|
|
<span>mobile :<?= $value->mobile_no ?></span><br>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</td>
|
|
<td class="org-receipt">
|
|
<table class="invoice-info-table">
|
|
<?php foreach ($data as $value) : ?>
|
|
<tr>
|
|
<th>Receipt # : <?= $value->receipt_number ?></th>
|
|
</tr>
|
|
<tr>
|
|
<th>ORG PAN Number : <?= $value->pan_no ?></th>
|
|
</tr>
|
|
<tr>
|
|
<th>ORG Reg Number : <?= $value->org_reg_no ?></th>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="addresses-table">
|
|
<tr>
|
|
<th class="billing-address">Donar Details</th><br><br>
|
|
</tr>
|
|
<tr>
|
|
<td class="billing-address">
|
|
<?php foreach ($data as $value) : ?>
|
|
<p><b>Donated By</b> : <?= $value->customer_name ?></p>
|
|
<p><b>Doner PAN Number</b> : <?= $value->cust_pan_no ?></p>
|
|
<p><b>Address</b> : <?= $value->address ?></p>
|
|
<p><b>Date of Donation</b> : <?= isset($value->receipt_date) ? date("d-m-Y", strtotime($value->receipt_date)) : '' ?></p>
|
|
<p><b>Donated via</b> : <?= $value->payment_mode ?></p>
|
|
<p><b>Donation Amount</b> : <?= $value->amount ?></p>
|
|
<?php endforeach; ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br> <br>
|
|
</body>
|
|
</html>
|