From fa6bb33c7aed177a86c8f34c9a22f412cc4dd67e Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 28 Aug 2021 12:54:21 -0400 Subject: [PATCH] Fied Contact Email showing under ticket details and Phone Number formatting --- ticket.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ticket.php b/ticket.php index c229bb8b..22aad78f 100644 --- a/ticket.php +++ b/ticket.php @@ -35,7 +35,6 @@ if(isset($_GET['ticket_id'])){ $ticket_updated_at = $row['ticket_updated_at']; $ticket_closed_at = $row['ticket_closed_at']; $ticket_created_by = $row['ticket_created_by']; - $name = $row['name']; if($ticket_status == "Open"){ $ticket_status_display = "$ticket_status"; @@ -60,15 +59,21 @@ if(isset($_GET['ticket_id'])){ $contact_title = $row['contact_title']; $contact_email = $row['contact_email']; $contact_phone = $row['contact_phone']; + if(strlen($contact_phone)>2){ + $contact_phone = substr($row['contact_phone'],0,3)."-".substr($row['contact_phone'],3,3)."-".substr($row['contact_phone'],6,4); + } $contact_extension = $row['contact_extension']; $contact_mobile = $row['contact_mobile']; + if(strlen($contact_mobile)>2){ + $contact_mobile = substr($row['contact_mobile'],0,3)."-".substr($row['contact_mobile'],3,3)."-".substr($row['contact_mobile'],6,4); + } $location_name = $row['location_name']; $location_address = $row['location_address']; $location_city = $row['location_city']; $location_state = $row['location_state']; $location_zip = $row['location_zip']; $location_phone = $row['location_phone']; - if(strlen($client_phone)>2){ + if(strlen($location_phone)>2){ $location_phone = substr($row['location_phone'],0,3)."-".substr($row['location_phone'],3,3)."-".substr($row['location_phone'],6,4); } @@ -242,7 +247,7 @@ if(isset($_GET['ticket_id'])){ - +