From 18444189c8485d49dcc619d5fe2400f3fc2480b0 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Thu, 6 Feb 2020 20:41:24 -0500 Subject: [PATCH] updated guest invoice view added ribbon for paid invoices --- guest_view_invoice.php | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/guest_view_invoice.php b/guest_view_invoice.php index 3de6454b..31b23f79 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -66,6 +66,21 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ $browser = get_web_browser(); $device = get_device(); + //Set Badge color based off of invoice status + if($invoice_status == "Sent"){ + $invoice_badge_color = "warning text-white"; + }elseif($invoice_status == "Viewed"){ + $invoice_badge_color = "info"; + }elseif($invoice_status == "Partial"){ + $invoice_badge_color = "primary"; + }elseif($invoice_status == "Paid"){ + $invoice_badge_color = "success"; + }elseif($invoice_status == "Cancelled"){ + $invoice_badge_color = "danger"; + }else{ + $invoice_badge_color = "secondary"; + } + //Update status to Viewed only if invoice_status = "Sent" if($invoice_status == 'Sent'){ mysqli_query($mysqli,"UPDATE invoices SET invoice_status = 'Viewed' WHERE invoice_id = $invoice_id"); @@ -92,19 +107,6 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ $invoice_color = "text-danger"; } } - - //Set Badge color based off of invoice status - if($invoice_status == "Sent"){ - $invoice_badge_color = "warning text-white"; - }elseif($invoice_status == "Partial"){ - $invoice_badge_color = "primary"; - }elseif($invoice_status == "Paid"){ - $invoice_badge_color = "success"; - }elseif($invoice_status == "Cancelled"){ - $invoice_badge_color = "danger"; - }else{ - $invoice_badge_color = "secondary"; - } ?> @@ -127,7 +129,14 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
-

Invoice

+ +
+
+ +
+
+ +

Invoice

@@ -314,7 +323,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ - ( Days) + ( Days Late) $