subscription module

This commit is contained in:
heama 2023-09-28 18:31:07 +05:30
parent 048d9ba61b
commit 2df4cedf11
4 changed files with 17 additions and 19 deletions

View File

@ -48,6 +48,7 @@ class Subscription extends BaseController
//print_r($data);die();
$this->render_page('subscription_form', $data);
}
// Subscription Controller (Subscription.php)
public function add_subscription() {
helper('session');

View File

@ -7,7 +7,7 @@
font-family: 'Times New Roman', Times, sans-serif;
font-size: 14px; /* Change this value to your desired font size */
font-size: 12px; /* Change this value to your desired font size */
}
/* Style for the main table with border */
@ -155,15 +155,14 @@ td.invoice-number {
</table>
</td>
<td>
<table class="invoice-info-table">
<table class="invoice-info-table">
<?php foreach ($data as $value) : ?>
<tr>
<th>Invoice #</th>
<td class="invoice-number"><?= $value->invoice_number ?></td>
<th>Invoice # <?= $value->invoice_number ?></th>
</tr>
<tr>
<th>Invoice Date</th>
<?php
<?php
// Assuming $value->invoice_date is in yyyy-mm-dd format
$invoiceDateParts = explode('-', $value->invoice_date);
if (count($invoiceDateParts) === 3) {
@ -172,25 +171,28 @@ if (count($invoiceDateParts) === 3) {
$formattedInvoiceDate = 'Invalid Date'; // Handle invalid dates gracefully
}
?>
<th>Invoice Date : <?= $formattedInvoiceDate ?></th>
<!-- Display the formatted invoice date -->
<td><?= $formattedInvoiceDate ?></td>
<td></td>
</tr>
<tr>
<th>Order Number</th>
<td><?= $value->order_number ?></td>
<th>Order Number : <?= $value->order_number ?></th>
</tr>
<tr>
<th>Due Date</th>
<?php $invoiceDateParts = explode('-', $value->due_date);
<?php $invoiceDateParts = explode('-', $value->due_date);
if (count($invoiceDateParts) === 3) {
$formattedDueDate = $invoiceDateParts[2] . '/' . $invoiceDateParts[1] . '/' . $invoiceDateParts[0];
} else {
$formattedDueDate = 'Invalid Date'; // Handle invalid dates gracefully
}
?>
<th>Due Date : <?= $formattedDueDate ?></th>
<!-- Display the formatted invoice date -->
<td><?= $formattedDueDate ?></td>
</tr>
<?php endforeach; ?>

View File

@ -82,7 +82,7 @@
<img src="barcode.png" alt="Barcode">
</div>
<div class="footer">"<?= $customer['scheme_name'] ?>" Expires on "<?= $customer['to_subscription'] ?>" </div>
<div class="footer">"<?= $customer['scheme_name'] ?>" Expires on "<?= date('d-m-Y', strtotime($customer['to_subscription'])) ?>" </div>
</div>
<?php endforeach; ?>
</body>

View File

@ -178,12 +178,7 @@
<span>Subscription </span>
</a>
</li>
<li>
<a href="<?= base_url()."addressprint"; ?>">
<i class="bx bx-file"></i>
<span>Address Print </span>
</a>
</li>
<li>
<a href="<?= base_url()."mail_custom_notifications"; ?>">
<i class="ri-notification-3-fill"></i>