diff --git a/ticket.php b/ticket.php index b2b56e99..df7bfba3 100644 --- a/ticket.php +++ b/ticket.php @@ -34,6 +34,7 @@ if (isset($_GET['ticket_id'])) { LEFT JOIN asset_interfaces ON interface_asset_id = asset_id AND interface_primary = 1 LEFT JOIN vendors ON ticket_vendor_id = vendor_id LEFT JOIN projects ON ticket_project_id = project_id + LEFT JOIN quotes ON ticket_quote_id = quote_id LEFT JOIN invoices ON ticket_invoice_id = invoice_id LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id LEFT JOIN categories ON ticket_category = category_id @@ -104,13 +105,15 @@ if (isset($_GET['ticket_id'])) { $ticket_updated_at_ago = timeAgo($row['ticket_updated_at']); $ticket_resolved_at = nullable_htmlentities($row['ticket_resolved_at']); $ticket_resolved_at_ago = timeAgo($row['ticket_resolved_at']); + $ticket_resolved_date = date('Y-m-d', strtotime($ticket_resolved_at)); $ticket_closed_at = nullable_htmlentities($row['ticket_closed_at']); $ticket_closed_at_ago = timeAgo($row['ticket_closed_at']); + $ticket_closed_date = date('Y-m-d', strtotime($ticket_closed_at)); $ticket_closed_by = intval($row['ticket_closed_by']); $ticket_assigned_to = intval($row['ticket_assigned_to']); if (empty($ticket_assigned_to)) { - $ticket_assigned_to_display = "Not Assigned"; + $ticket_assigned_to_display = "Not Assigned"; } else { $ticket_assigned_to_display = nullable_htmlentities($row['user_name']); } @@ -163,6 +166,11 @@ if (isset($_GET['ticket_id'])) { $location_zip = nullable_htmlentities($row['location_zip']); $location_phone = formatPhoneNumber($row['location_phone']); + $quote_id = intval($row['ticket_quote_id']); + $quote_prefix = nullable_htmlentities($row['quote_prefix']); + $quote_number = intval($row['quote_number']); + $quote_created_at = nullable_htmlentities($row['quote_created_at']); + $invoice_id = intval($row['ticket_invoice_id']); $invoice_prefix = nullable_htmlentities($row['invoice_prefix']); $invoice_number = intval($row['invoice_number']); @@ -181,7 +189,7 @@ if (isset($_GET['ticket_id'])) { $row = mysqli_fetch_array($sql_project_manager); $project_manager_name = nullable_htmlentities($row['user_name']); } - + if ($contact_id) { //Get Contact Ticket Stats $ticket_related_open = mysqli_query($mysqli, "SELECT COUNT(ticket_id) AS ticket_related_open FROM tickets WHERE ticket_status != 'Closed' AND ticket_contact_id = $contact_id "); @@ -472,39 +480,12 @@ if (isset($_GET['ticket_id'])) {
-
- -
Updated:
- - -
- Closed by: -
-
- Closed at: -
-
- -
- -
- Feedback: -
- - + + + +
+ +
- + +
@@ -530,21 +516,29 @@ if (isset($_GET['ticket_id'])) {
- + + +
Scheduled:
- + - // Billable - if ($config_module_enable_accounting) { ?> - = 1) { ?> + + = 1) { ?> + +
- Invoiced: + Quoted:
- = 1) { ?> + + + +
+ Invoiced: +
+
Ticket is
- - + + + + +
- Tasks Completed% + Tasks Completed + %
/
- -
- Total time worked: -
- - - -
- -
- - - 0) { ?> -
- -
- -
@@ -660,7 +638,7 @@ if (isset($_GET['ticket_id'])) {
-