diff --git a/client_statement.php b/client_statement.php
index fa166620..c58eabdb 100644
--- a/client_statement.php
+++ b/client_statement.php
@@ -1,7 +1,7 @@
Number
Subject |
Contact |
+ Billable |
Priority |
Status |
Assigned |
@@ -117,6 +119,7 @@ $total_tickets_closed = intval($row['total_tickets_closed']);
$ticket_subject = nullable_htmlentities($row['ticket_subject']);
$ticket_priority = nullable_htmlentities($row['ticket_priority']);
$ticket_status = nullable_htmlentities($row['ticket_status']);
+ $ticket_billable = intval($row['ticket_billable']);
$ticket_vendor_ticket_number = nullable_htmlentities($row['ticket_vendor_ticket_number']);
$ticket_created_at = nullable_htmlentities($row['ticket_created_at']);
$ticket_created_at_time_ago = timeAgo($row['ticket_created_at']);
@@ -195,6 +198,15 @@ $total_tickets_closed = intval($row['total_tickets_closed']);
|
+
+
+ $";
+ } else {
+ echo "X";
+ }
+ ?> |
|
|
|
@@ -217,6 +229,8 @@ $total_tickets_closed = intval($row['total_tickets_closed']);
require "ticket_edit_contact_modal.php";
+ require "ticket_edit_billable_modal.php";
+
}
}
diff --git a/post/ticket.php b/post/ticket.php
index 59370566..892c636b 100644
--- a/post/ticket.php
+++ b/post/ticket.php
@@ -1097,3 +1097,35 @@ if (isset($_POST['bulk_delete_scheduled_tickets'])) {
header("Location: " . $_SERVER["HTTP_REFERER"]);
}
+
+if(isset($_POST['set_billable_status'])) {
+
+ validateTechRole();
+
+ $ticket_id = intval($_POST['ticket_id']);
+ $billable_status = sanitizeInput($_POST['billable_status']);
+
+ mysqli_query($mysqli,
+ "UPDATE tickets SET
+ ticket_billable = '$billable_status'
+ WHERE ticket_id = $ticket_id"
+ );
+
+ //Logging
+ mysqli_query(
+ $mysqli,
+ "INSERT INTO logs SET
+ log_type = 'Ticket',
+ log_action = 'Modify',
+ log_description = '$session_name modified ticket billable status',
+ log_ip = '$session_ip',
+ log_user_agent = '$session_user_agent',
+ log_user_id = $session_user_id,
+ log_entity_id = $ticket_id"
+ );
+
+ $_SESSION['alert_message'] = "Ticket billable status updated";
+
+ header("Location: " . $_SERVER["HTTP_REFERER"]);
+
+}
\ No newline at end of file
diff --git a/ticket.php b/ticket.php
index c65bfd30..1179fb99 100644
--- a/ticket.php
+++ b/ticket.php
@@ -637,6 +637,21 @@ if (isset($_GET['ticket_id'])) {
Total time worked:
+
+
+
+
@@ -851,6 +866,8 @@ if (isset($_GET['ticket_id'])) {
require_once "ticket_invoice_add_modal.php";
+ require_once "ticket_edit_billable_modal.php";
+
}
diff --git a/ticket_edit_billable_modal.php b/ticket_edit_billable_modal.php
new file mode 100644
index 00000000..2a9bb030
--- /dev/null
+++ b/ticket_edit_billable_modal.php
@@ -0,0 +1,42 @@
+
diff --git a/ticket_edit_modal.php b/ticket_edit_modal.php
index d486c44d..63e35c14 100644
--- a/ticket_edit_modal.php
+++ b/ticket_edit_modal.php
@@ -68,7 +68,7 @@
-