Fixed overdue status in invoice also added description under edit revenue
This commit is contained in:
@@ -103,6 +103,11 @@
|
|||||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" value="<?php echo $revenue_reference; ?>">
|
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" value="<?php echo $revenue_reference; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Description</label>
|
||||||
|
<textarea class="form-control" rows="4" name="description"><?php echo $revenue_description; ?></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-white">
|
<div class="modal-footer bg-white">
|
||||||
|
|||||||
15
invoice.php
15
invoice.php
@@ -49,11 +49,11 @@ if(isset($_GET['invoice_id'])){
|
|||||||
$balance = $invoice_amount - $amount_paid;
|
$balance = $invoice_amount - $amount_paid;
|
||||||
|
|
||||||
//check to see if overdue
|
//check to see if overdue
|
||||||
|
if($invoice_status !== "Paid" AND $invoice_status !== "Draft" AND $invoice_status !== "Cancelled"){
|
||||||
$unixtime_invoice_due = strtotime($invoice_due);
|
$unixtime_invoice_due = strtotime($invoice_due);
|
||||||
if($unixtime_invoice_due < time()){
|
if($unixtime_invoice_due < time()){
|
||||||
$invoice_status = "Overdue";
|
$invoice_overdue = "Overdue";
|
||||||
$invoice_color = "text-danger";
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set Badge color based off of invoice status
|
//Set Badge color based off of invoice status
|
||||||
@@ -80,8 +80,11 @@ if(isset($_GET['invoice_id'])){
|
|||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
<a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item active">INV-<?php echo $invoice_number; ?></li>
|
<li class="breadcrumb-item active"><?php echo $invoice_number; ?></li>
|
||||||
<span class="p-2 ml-2 badge badge-<?php echo $invoice_badge_color; ?>"><?php echo $invoice_status; ?></span>
|
<span class="p-2 ml-2 badge badge-<?php echo $invoice_badge_color; ?>"><?php echo $invoice_status; ?></span>
|
||||||
|
<?php if(isset($invoice_overdue)){ ?>
|
||||||
|
<span class="p-2 ml-2 badge badge-danger"><?php echo $invoice_overdue; ?></span>
|
||||||
|
<?php } ?>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user