the_mechanic/app/Views/outsourcing_template.php
2024-09-25 09:12:05 +05:30

228 lines
6.3 KiB
PHP
Executable File

<!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 */
}
/* Define a class for bottom border */
.bottom-border {
border-bottom: 1px solid black !important;
}
/* Style for the main table with border */
table.main-table {
width: 100%;
border-collapse: collapse;
border: -0.5px 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 */
}
/* 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: center;
}
img.business-logo {
max-width: 200px; /* Adjust the size of the logo */
}
/* 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%;
border-collapse: collapse;
}
table.invoice-info-table th,
table.invoice-info-table td {
border: 1px solid;
text-align: left;
}
/* Style for the addresses table */
table.addresses-table {
width: 100%;
}
table.addresses-table th {
text-align: left;
padding-left: 8px;
}
/* Style for the billing and shipping addresses */
.billing-address {
width: 50%;
padding-left: 8px;
}
/* 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: left; /* Center-align text in cells */
max-width: 2px;
}
table.invoice-related-table th {
background-color: #DAC2AD;
font-weight: bold;
}
/* --------------------------------- */
table.invoice-related-table1 {
/* width: 100%; */
border-collapse: collapse;
}
table.invoice-related-table1 th,
table.invoice-related-table1 td {
border: none;
padding: 8px;
text-align: left;
max-width: 2px;
}
table.invoice-related-table1 th {
background-color: #DAC2AD;
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 */
}
p {
margin-top: 0;
margin-bottom: 0rem;
}
</style>
</head>
<body>
<table><tr>
<td style="padding:20px;"><b>DATE: </b><?= date('d-m-Y') ?></td>
<td style="padding:20px;"><h3><b>OUT SOURCE</b></h3></td>
</tr></table>
<br>
<table class="list" style="width:100%; table-layout: fixed;">
<tr>
<td style="width: 100%; vertical-align: top;">
<table class="invoice-related-table1" style="width:100%;">
<tbody>
<!-- <tr style="border: 1px solid black;">
<th style="border: 0.5px solid black;" colspan="2"><center>TYPE OF SERVICES</center></th>
</tr> -->
<tr style="border: 1px solid black;">
<th style="border: 0.5px solid black;">Bike Detail</th>
<th style="border: 0.5px solid black;">Out Source List</th>
</tr>
<?php foreach ($outsource as $key => $item) : ?>
<tr>
<td style="border: 0.5px solid black;">
<?= $item['reg_no'] ?><br>
<?= $item['bike_name'] ?> - <?= $item['bike_modal_name'] ?><br>
<?= $item['colour'] ?> color<br>
<?= $item['delivery_date'] ?> delivery date<br>
</td>
<td style="padding: 0;width: 33%;border: 0.5px solid black;">
<table style="margin-left: -2px;width: 101%;padding: 0;">
<?php $nameCount = count($item['names']); ?>
<?php foreach ($item['names'] as $index => $name): ?>
<tr>
<!-- Apply the class conditionally -->
<td class="inner-box" style="<?= $index !== $nameCount - 1 ? 'border-bottom: 1px solid black;' : '' ?>">
<?= $name ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</td>
</tr>
</table>
<br>
<br>
</body>
</html>