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) $