From 333e885a39253994e072276985159bfd968a91f1 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 9 Apr 2019 13:26:46 -0400 Subject: [PATCH] Started working on Global Search and did some tidying up --- add_client_invoice_modal.php | 65 +++++++++++++ client.php | 4 +- client_assets.php | 7 +- client_invoices.php | 40 ++++++-- config.php | 16 +++- global_search.php | 178 +++++++++++++++++++++++++++++++++++ invoice.php | 2 +- invoices.php | 12 +-- payments.php | 1 + post.php | 6 +- top_nav.php | 4 +- 11 files changed, 309 insertions(+), 26 deletions(-) create mode 100644 add_client_invoice_modal.php create mode 100644 global_search.php diff --git a/add_client_invoice_modal.php b/add_client_invoice_modal.php new file mode 100644 index 00000000..f789cfe1 --- /dev/null +++ b/add_client_invoice_modal.php @@ -0,0 +1,65 @@ + \ No newline at end of file diff --git a/client.php b/client.php index 8f03c450..b92a0402 100644 --- a/client.php +++ b/client.php @@ -107,7 +107,7 @@ if(isset($_GET['client_id'])){ New Network New Domain New Application - New Invoice + New Invoice New Quote New Attachment New Note @@ -146,7 +146,7 @@ if(isset($_GET['client_id'])){ - + diff --git a/client_assets.php b/client_assets.php index 5b0587da..4d7e5228 100644 --- a/client_assets.php +++ b/client_assets.php @@ -6,7 +6,7 @@ Type Name - Make + Make/Model Serial Actions @@ -52,8 +52,9 @@ diff --git a/client_invoices.php b/client_invoices.php index e7601fc2..0baa4de0 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -1,6 +1,6 @@ @@ -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"; + } ?> - INV- - $ - - - + INV- + $ + +
+ + + + +