CHANGE_MECHANIC_JOB_INVOICE:ss
This commit is contained in:
parent
31c0581512
commit
880c72f7fd
273
app/Views/invoice_pdf_template_jobcard.php
Normal file
273
app/Views/invoice_pdf_template_jobcard.php
Normal file
@ -0,0 +1,273 @@
|
||||
<!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: -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%;
|
||||
}
|
||||
|
||||
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;
|
||||
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: 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 */
|
||||
}
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class="main-table">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="business-details-table">
|
||||
|
||||
<?php foreach ($company_address as $value) : ?>
|
||||
<td style="max-width: 50px;">
|
||||
<p><b>THE MECHANIC</b><br>
|
||||
<?= $value['address'] ?>,<br>
|
||||
<?= '<b>GSTNO: </b>'.$value['gstno'] ?><br>
|
||||
<?= '<b>State Name: </b>'.$value['state'].', code'.$value['code'] ?><br>
|
||||
<?= '<b>Contact: </b>'.$value['postal_code'] ?><br>
|
||||
<?= '<b>Email: </b>'.$value['email'] ?></p>
|
||||
<br>
|
||||
<b>Buyer (Bill To)</b><br>
|
||||
<p><?= $job_card[0]['billing_address'].', '.$job_card[0]['billing_city'].', '.$job_card[0]['billing_state'].', '.$job_card[0]['billing_country'].', '.$job_card[0]['billing_postal_code'] ?>,<br>
|
||||
<?= '<b>GSTNO: </b>' ?><br>
|
||||
<?= '<b>State Name: </b>'.$job_card[0]['billing_state'] ?><br>
|
||||
<?= '<b>Place of Supply: </b>'.$value['state'] ?></p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table class="invoice-info-table" style="max-width: 250px;border: 1px solid black;">
|
||||
<tr>
|
||||
<td>Invoice No.</td>
|
||||
<td>1657</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid black;">
|
||||
<td>Bike Name</td>
|
||||
<td><?= $vehicle[0]['bike_company'].' '.$vehicle[0]['bike_name'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color</td>
|
||||
<td><?= $vehicle[0]['colour'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bie Number</td>
|
||||
<td><?= $vehicle[0]['reg_no'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contact Number</td>
|
||||
<td><?= $vehicle[0]['mobile_no'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Job Card Number</td>
|
||||
<td><?= $vehicle[0]['order_number'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dated</td>
|
||||
<td><?= (new DateTime($vehicle[0]['created_at']))->format('d/m/Y') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delivery Date</td>
|
||||
<td>04/06/2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mode of Payment</td>
|
||||
<td>Online</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="invoice-related-table">
|
||||
<thead>
|
||||
<tr style="border: 1px solid black;">
|
||||
<th style="border: 0.5px solid black;">S no</th>
|
||||
<th style="border: 0.5px solid black;">Description Of Goods</th>
|
||||
<th style="border: 0.5px solid black;">Taxable Value</th>
|
||||
<th style="border: 0.5px solid black;">Quantity</th>
|
||||
<th style="border: 0.5px solid black;">Per</th>
|
||||
<th style="border: 0.5px solid black;">GST</th>
|
||||
<th style="border: 0.5px solid black;">CGST Amount</th>
|
||||
<th style="border: 0.5px solid black;">SGST Amount</th>
|
||||
<th style="border: 0.5px solid black;">Total Tax</th>
|
||||
<th style="border: 0.5px solid black;">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $serialNumber = 1; ?>
|
||||
<?php foreach ($job_card_products as $item) : $totalamount = 0; ?>
|
||||
<tr>
|
||||
|
||||
<td style="border: 1px solid black;">
|
||||
<?= $serialNumber++; ?>
|
||||
</td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['product_name'] ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['amount'] ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['qty'] ?></td>
|
||||
<td style="border-right: 0.5px solid black;">nos</td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['tax'] ?>%</td>
|
||||
<td style="border-right: 0.5px solid black;"><?= ($item['amount'] * ($item['tax'] / 2) / 100) ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?= ($item['amount'] * ($item['tax'] / 2) / 100) ?></td>
|
||||
<td style="border: 0.5px solid black;"><?= ($item['amount'] * $item['tax'] / 100) ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?= ($item['amount'] + ($item['amount'] * $item['tax'] / 100) ) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td colspan="6" style="border-top: 0.5px solid black;border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">Total Taxable Value</td>
|
||||
<td style="border: 0.5px solid black;"><?= $job_card[0]['tax'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">CGST</td>
|
||||
<td style="border: 0.5px solid black;"><?= $job_card[0]['tax'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">SGST</td>
|
||||
<td style="border: 0.5px solid black;"><?= $job_card[0]['tax'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">Total</td>
|
||||
<td style="border: 0.5px solid black;"><?= $job_card[0]['total'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10" style="border: 0.5px solid black;">Amount Chargeable (in words)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user