Invoice Type fixes : ps
This commit is contained in:
parent
35fc81f123
commit
edbdce13c0
@ -31,7 +31,7 @@ class BooksModel extends Model
|
||||
{
|
||||
$builder = $this->builder();
|
||||
$builder->select('books.book_id, books.title, books.price, books.duration, books.isactive, books.publisher, books.genre, books.language, books.publication_date, GROUP_CONCAT(category.name SEPARATOR \',\') as name');
|
||||
$builder->join('book_categories', 'book_categories.book_id = books.book_id', 'left');
|
||||
$builder->join('book_categories', 'book_categories.book_id = books.book_id and book_categories.isactive = 1', 'left');
|
||||
$builder->join('category', 'category.id = book_categories.category_id', 'left');
|
||||
$builder->where('books.business_id', $business_id);
|
||||
$builder->where('category.name !=', 'membership'); // Exclude books with the category name "membership"
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
<label for="invoiceDate">Invoice Date<span class="text-danger"> *</span></label>
|
||||
<input type="date" class="form-control" id="invoiceDate" name="invoice_date" value="<?= isset($invoice_details['invoice_date']) ? $invoice_details['invoice_date'] : '' ?>" required>
|
||||
</div>
|
||||
<?php if ($invoice_type === '1') : ?>
|
||||
<?php if ($invoice_type === '2') : ?>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="fromsubcription">From Subcription<span class="text-danger"> *</span></label>
|
||||
<input type="date" class="form-control" id="fromsubcription" name="from_subscription" value="<?= isset($invoice_item_details[0]['from_subscription']) ? $invoice_item_details[0]['from_subscription'] : '' ?>" required onchange="updateToDateMinDate(this.value)">
|
||||
@ -182,7 +182,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-group text-right m-b-0">
|
||||
<?php if ($invoice_type !== '1') : ?>
|
||||
<?php if ($invoice_type !== '2') : ?>
|
||||
<!-- Show the "Add More Item" button only if invoice_type is not 1 -->
|
||||
<a class="btn" id="addItem">
|
||||
<h4><i class="fa fa-plus" aria-hidden="true"></i> Add More Item</h4>
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($invoice as $row) :
|
||||
if ($row['invoice_type'] == 2) : // Check if it's a subscription invoice
|
||||
if ($row['invoice_type'] == 1) : // Check if it's a subscription invoice
|
||||
$invoice_date = date('d/m/Y', strtotime($row['invoice_date']));
|
||||
?>
|
||||
<tr>
|
||||
@ -77,9 +77,9 @@
|
||||
<td><?= "₹ ".$row['total_amount']; ?></td>
|
||||
<td>
|
||||
<!-- <a href="<?= base_url() . "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button" title="Approve the Invoice"><i class="ri-checkbox-circle-fill"></i></a> -->
|
||||
<?php if ($row['invoice_type'] == 1) : ?>
|
||||
<?php if ($row['invoice_type'] == 2) : ?>
|
||||
<a href="<?= base_url() . "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||
<?php elseif ($row['invoice_type'] == 2) : ?>
|
||||
<?php elseif ($row['invoice_type'] == 1) : ?>
|
||||
<a href="<?= base_url() . "new_book_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($invoice as $row) :
|
||||
if ($row['invoice_type'] == 1) :
|
||||
if ($row['invoice_type'] == 2) :
|
||||
$invoice_date = date('d/m/Y', strtotime($row['invoice_date']));
|
||||
?>
|
||||
<tr>
|
||||
@ -43,9 +43,9 @@
|
||||
<td><?= "₹ " . $row['total_amount']; ?></td>
|
||||
<td>
|
||||
<!-- <a href="<?= base_url() . "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button" title="Approve the Invoice"><i class="ri-checkbox-circle-fill"></i></a> -->
|
||||
<?php if ($row['invoice_type'] == 1) : ?>
|
||||
<?php if ($row['invoice_type'] == 2) : ?>
|
||||
<a href="<?= base_url() . "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||
<?php elseif ($row['invoice_type'] == 2) : ?>
|
||||
<?php elseif ($row['invoice_type'] == 1) : ?>
|
||||
<a href="<?= base_url() . "new_book_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user