diff --git a/db.sql b/db.sql index c97acf47..e0c5a205 100644 --- a/db.sql +++ b/db.sql @@ -999,6 +999,8 @@ DROP TABLE IF EXISTS `ticket_replies`; CREATE TABLE `ticket_replies` ( `ticket_reply_id` int(11) NOT NULL AUTO_INCREMENT, `ticket_reply` longtext NOT NULL, + `ticket_reply_type` varchar(9) NOT NULL, + `ticket_reply_time_worked` time DEFAULT NULL, `ticket_reply_created_at` datetime NOT NULL, `ticket_reply_updated_at` datetime DEFAULT NULL, `ticket_reply_archived_at` datetime DEFAULT NULL, @@ -1025,6 +1027,7 @@ CREATE TABLE `tickets` ( `ticket_details` longtext NOT NULL, `ticket_priority` varchar(200) DEFAULT NULL, `ticket_status` varchar(200) NOT NULL, + `ticket_feedback` varchar(104) DEFAULT NULL, `ticket_created_at` datetime NOT NULL, `ticket_updated_at` datetime DEFAULT NULL, `ticket_archived_at` datetime DEFAULT NULL, diff --git a/post.php b/post.php index a7138685..d9959c7c 100644 --- a/post.php +++ b/post.php @@ -4919,7 +4919,7 @@ if(isset($_POST['assign_ticket'])){ mysqli_query($mysqli,"UPDATE tickets SET ticket_updated_at = NOW(), ticket_assigned_to = $assigned_to WHERE ticket_id = $ticket_id AND company_id = $session_company_id"); - mysqli_query($mysqli,"INSERT INTO ticket_replies SET ticket_reply = 'Ticket re-assigned', ticket_reply_created_at = NOW(), ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id, company_id = $session_company_id") or die(mysqli_error($mysqli)); + mysqli_query($mysqli,"INSERT INTO ticket_replies SET ticket_reply = 'Ticket re-assigned', ticket_reply_type = 'Internal', ticket_reply_time_worked = '00:01:00', ticket_reply_created_at = NOW(), ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id, company_id = $session_company_id") or die(mysqli_error($mysqli)); //Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Ticket', log_action = 'Modified', log_description = '$subject', log_created_at = NOW(), company_id = $session_company_id, log_user_id = $session_user_id"); @@ -4949,8 +4949,16 @@ if(isset($_POST['add_ticket_reply'])){ $ticket_id = intval($_POST['ticket_id']); $ticket_reply = trim(mysqli_real_escape_string($mysqli,$_POST['ticket_reply'])); $ticket_status = trim(mysqli_real_escape_string($mysqli,$_POST['status'])); + $ticket_reply_time_worked = trim(mysqli_real_escape_string($mysqli,$_POST['time'])); - mysqli_query($mysqli,"INSERT INTO ticket_replies SET ticket_reply = '$ticket_reply', ticket_reply_created_at = NOW(), ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id, company_id = $session_company_id") or die(mysqli_error($mysqli)); + if(isset($_POST['public_reply_type'])){ + $ticket_reply_type = 'Public'; + } + else{ + $ticket_reply_type = 'Internal'; + } + + mysqli_query($mysqli,"INSERT INTO ticket_replies SET ticket_reply = '$ticket_reply', ticket_reply_time_worked = '$ticket_reply_time_worked', ticket_reply_type = '$ticket_reply_type', ticket_reply_created_at = NOW(), ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id, company_id = $session_company_id") or die(mysqli_error($mysqli)); //UPDATE Ticket Last Response Field mysqli_query($mysqli,"UPDATE tickets SET ticket_status = '$ticket_status', ticket_updated_at = NOW() WHERE ticket_id = $ticket_id AND company_id = $session_company_id") or die(mysqli_error($mysqli)); diff --git a/setup.php b/setup.php index 1855f73e..929109b6 100644 --- a/setup.php +++ b/setup.php @@ -947,14 +947,19 @@ if(isset($_POST['add_company_settings'])){

A database must be created before proceeding, then click on the Setup button to to get started,


-

After the setup is complete add cron.php to your cron and set it to run once everyday at 11:00PM. This is for tasks such as sending out recurring invoices, late payment reminders, alerts, etc

+

Post installation, additional steps are required for tasks such as sending out recurring invoices, late payment reminders, scheduled tickets, alerts, etc.

+
-

An API is present to allow integration with other third pary apps. An API Key will be auto generated and can be changed in settings after setup. The API will give you the following capabilities

+

An API is present to allow integration with other third pary apps. An API Key will be auto generated and can be changed in settings after setup. The API will give you the following capabilities:

-

Nothing to see here

Go Back"; include("footer.php"); - + }else{ $row = mysqli_fetch_array($sql); @@ -31,7 +31,7 @@ if(isset($_GET['ticket_id'])){ $client_net_terms = $config_default_net_terms; } - + $ticket_prefix = $row['ticket_prefix']; $ticket_number = $row['ticket_number']; $ticket_category = $row['ticket_category']; @@ -69,7 +69,7 @@ if(isset($_GET['ticket_id'])){ $contact_phone = formatPhoneNumber($row['contact_phone']); $contact_extension = $row['contact_extension']; $contact_mobile = formatPhoneNumber($row['contact_mobile']); - + $asset_id = $row['asset_id']; $asset_name = htmlentities($row['asset_name']); $asset_type = htmlentities($row['asset_type']); @@ -149,6 +149,7 @@ if(isset($_GET['ticket_id'])){ while($row = mysqli_fetch_array($sql)){; $ticket_reply_id = $row['ticket_reply_id']; $ticket_reply = $row['ticket_reply']; + $ticket_reply_type = $row['ticket_reply_type']; $ticket_reply_created_at = $row['ticket_reply_created_at']; $ticket_reply_updated_at = $row['ticket_reply_updated_at']; $ticket_reply_by = $row['ticket_reply_by']; @@ -156,10 +157,12 @@ if(isset($_GET['ticket_id'])){ $user_id = $row['user_id']; $user_avatar = $row['user_avatar']; $user_initials = initials($row['user_name']); + $ticket_reply_time_worked = date_create($row['ticket_reply_time_worked']); ?> -
- +
mb-3"> + +

@@ -170,7 +173,7 @@ if(isset($_GET['ticket_id'])){ - @@ -178,10 +181,12 @@ if(isset($_GET['ticket_id'])){
+
+ Time worked:

- +
@@ -215,7 +220,7 @@ if(isset($_GET['ticket_id'])){
-
+
@@ -231,34 +236,40 @@ if(isset($_GET['ticket_id'])){
- +
+
+ +
+
-
-
-
- - + + +
+
+
+ + +
-
- - + +
- + - +
-
+

Client

@@ -269,7 +280,7 @@ if(isset($_GET['ticket_id'])){
-
+

Contact


@@ -296,16 +307,16 @@ if(isset($_GET['ticket_id'])){ ?>
-
-
@@ -317,7 +328,7 @@ if(isset($_GET['ticket_id'])){
-
+

Asset


@@ -342,8 +353,8 @@ if(isset($_GET['ticket_id'])){ ?>
-
@@ -351,7 +362,7 @@ if(isset($_GET['ticket_id'])){ -
+

Details

@@ -368,15 +379,15 @@ if(isset($_GET['ticket_id'])){