mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Started working on Global Search and did some tidying up
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id ORDER BY invoices.invoice_date DESC");
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id ORDER BY invoice_number DESC");
|
||||
|
||||
?>
|
||||
|
||||
@@ -25,16 +25,40 @@
|
||||
$invoice_status = $row['invoice_status'];
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_balance = $row['invoice_balance'];
|
||||
$invoice_amount = $row['invoice_amount'];
|
||||
//check to see if overdue
|
||||
|
||||
$unixtime_invoice_due = strtotime($invoice_due);
|
||||
if($unixtime_invoice_due < time()){
|
||||
$invoice_status = "Overdue";
|
||||
$invoice_color = "text-danger";
|
||||
}
|
||||
|
||||
//Set Badge color based off of invoice status
|
||||
if($invoice_status == "Sent"){
|
||||
$invoice_badge_color = "warning";
|
||||
}elseif($invoice_status == "Partial"){
|
||||
$invoice_badge_color = "primary";
|
||||
}elseif($invoice_status == "Paid"){
|
||||
$invoice_badge_color = "success";
|
||||
}elseif($invoice_status == "Overdue"){
|
||||
$invoice_badge_color = "danger";
|
||||
}else{
|
||||
$invoice_badge_color = "secondary";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>">INV-<?php echo "$invoice_number"; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_balance,2); ?></td>
|
||||
<td><?php echo "$invoice_date"; ?></td>
|
||||
<td><?php echo "$invoice_due"; ?></td>
|
||||
<td><?php echo "$invoice_status"; ?></td>
|
||||
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>">INV-<?php echo $invoice_number; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_amount,2); ?></td>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td><div class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></div></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $invoice_badge_color; ?>">
|
||||
<?php echo $invoice_status; ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@@ -52,7 +76,7 @@
|
||||
|
||||
<?php
|
||||
|
||||
include("edit_invoice_modal.php");
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user