mirror of https://github.com/itflow-org/itflow
Fixed overdue status in invoice also added description under edit revenue
This commit is contained in:
parent
778ecb356e
commit
90042531f2
|
|
@ -103,6 +103,11 @@
|
|||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" value="<?php echo $revenue_reference; ?>">
|
||||
</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 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;
|
||||
|
||||
//check to see if overdue
|
||||
|
||||
$unixtime_invoice_due = strtotime($invoice_due);
|
||||
if($unixtime_invoice_due < time()){
|
||||
$invoice_status = "Overdue";
|
||||
$invoice_color = "text-danger";
|
||||
if($invoice_status !== "Paid" AND $invoice_status !== "Draft" AND $invoice_status !== "Cancelled"){
|
||||
$unixtime_invoice_due = strtotime($invoice_due);
|
||||
if($unixtime_invoice_due < time()){
|
||||
$invoice_overdue = "Overdue";
|
||||
}
|
||||
}
|
||||
|
||||
//Set Badge color based off of invoice status
|
||||
|
|
@ -80,8 +80,11 @@ if(isset($_GET['invoice_id'])){
|
|||
<li class="breadcrumb-item">
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||
</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>
|
||||
<?php if(isset($invoice_overdue)){ ?>
|
||||
<span class="p-2 ml-2 badge badge-danger"><?php echo $invoice_overdue; ?></span>
|
||||
<?php } ?>
|
||||
</ol>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue