Add Open Quotes to the Side Nav

This commit is contained in:
johnnyq 2024-04-08 17:35:21 -04:00
parent a9e5c1ff9c
commit 3e14938a53
2 changed files with 12 additions and 1 deletions

View File

@ -24,6 +24,11 @@ $num_active_projects = $row['num'];
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('invoice_id') AS num FROM invoices WHERE (invoice_status = 'Sent' OR invoice_status = 'Viewed' OR invoice_status = 'Partial') AND invoice_archived_at IS NULL"));
$num_open_invoices = $row['num'];
// Open Quotes Count
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('quote_id') AS num FROM quotes WHERE (quote_status = 'Sent' OR quote_status = 'Viewed') AND quote_archived_at IS NULL"));
$num_open_quotes = $row['num'];
require_once "side_nav.php";
require_once "inc_wrapper.php";

View File

@ -81,7 +81,13 @@
echo "active";
} ?>">
<i class="nav-icon fas fa-comment-dollar"></i>
<p>Quotes</p>
<p>
Quotes
<?php
if ($num_open_quotes) { ?>
<span class="right badge text-light"><?php echo $num_open_quotes; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">