diff --git a/.gitignore b/.gitignore index 7d06cba2..dd0bf48d 100644 --- a/.gitignore +++ b/.gitignore @@ -32,10 +32,6 @@ plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/URI/* plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS/* !plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS/.gitkeep .vscode/settings.json -xcustom/* -!xcustom/readme.php -post/xcustom -!post/xcustom/readme.php admin/custom/* !admin/custom/readme.php agent/custom/* @@ -53,5 +49,3 @@ setup/custom/* api/v1/custom/* !api/v1/custom/readme.php .zed - - diff --git a/CHANGELOG.md b/CHANGELOG.md index aab7c5dd..5fbae131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,55 @@ This file documents all notable changes made to ITFlow. +## [26.02] Stable Release +### Bug Fixes +- Mail Parser - Do not automatically send new ticket notifications to noreply/donotreply addresses. +- Ticket: removed newline \n on Parsed emails. +- Show Trips for everyone if accounting module is enabled. +- Fix Invoice Exporting. +- Fix Billable Column not sorting correctly in tickets. +- Fix Login flow where user agent and client user exists and agent has MFA but will not let them continue. +- Fix passing missing user_id var in client portal. +- Fix Ticket Templates not auto filling when selected. +- Fix Invoices not being sent to all billings contacts when manaully sent. +- Fix Documents and Files not able to be bulk deleted. +- Fix Role Archiving, can be archived as long as no users are assigned to the role. +- Fix showing Powered By ITFlow visibility on the login screen when Whitelabel is enabled. +- Missing username in audit log on successful login due to missing passed user_id to logging. +- API: Fix updating all documents instead of the intended document. +- Documents: Fix Document created at not showing the correct creation date of the master document. +- Ticket: Fixed Using edit ticket modal agent was not able to be set. +- Always check if a user is archived and or disabled instead of just during login. +- Report: Fix Collected tax report not totalling all tax categories. + +### New Features & Updates +- Task Approval System for ticket tasks: Once an approval is requested, the task cannot be marked as complete until approved. Internal Approvals Any other technician, or Specific technician, Client Approvals Anyone (usually the requestor) Tech contacts Billing contacts. +- Printable Invoice Packing Slips now available. +- Drastic Performance Bump: Up to 50% faster queries accross the board and reduced server memory usage by 40% by switching Database Query method from mysqli_fetch_array to mysqli_fetch_assoc. +- Added Connect to Microsoft 365 Button to mail settings. +- OAUTH2 support for Microsoft 365 and Google Workspaces is now considered stable and working. +- Favorites: Assets and Credentials now can be favorited singly or by Bulk action. Favorited items appear in the client overview now. +- Files/Documents: Collapsable folders feature, collapsed by default with a button to expand all. +- URL Keys and such are now set to a more manageable 32 Characters by default. +- Various UI/UX Updates throughout the app, with focus oin ticket details, contact details modal etc. +- Added Show Archived files and documents to the files section. +- Added Bulk Archive and restore options to files and documents. +- Rewrite of the Kanban Ticket view to match our procedural style of coding. +- All options are available in TinyMCE now in Mobile mode. +- Agent names appear now in Invoice History section. +- Mail Parser: Support flowed text. +- Assets: Keep Purchase reference when copying. +- Assets: Add basic tracking history: Archiving, restoring, name changes, transferimg to new clients. +- Mail Parser: NDR Parsing. +- Allow SVG files in mail attachments. +- Tickets: Use a more friendly time worked instead of 02:41:00 translates to 2h 41m. +- Update wording on ticket to invoice item details. +- Merge Tickets: Now wth a ticket merge dropdown list of tickets instead of a text field. +- Role Permissions can now be set during role creation, update Permission UI to use radio buttons instead of select boxes. +- Bump TinyMCE 8.2.2 to 8.3.2. +- Bump PHPMailer from 7.0.1 to 7.0.2. +- Bump Datatables from 2.3.4 to 2.3.7. + ## [25.12.1] Maint Release ### Major Changes diff --git a/README.md b/README.md index d5c52ebe..ab9597c0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@
View demo
- Username: demo@demo | Password: demo + Username: demo@demo.com | Password: demo

About @@ -93,6 +93,7 @@ If you want to improve ITFlow, feel free to fork the repo and create a pull requ We’re incredibly grateful to the organizations and individuals who support the project - a big thank you to: - CompuMatter - F1 for HELP +- digiBandit - JetBrains (PhpStorm) ## License diff --git a/admin/ai_model.php b/admin/ai_model.php index 88c3b78b..2eab6bda 100644 --- a/admin/ai_model.php +++ b/admin/ai_model.php @@ -58,7 +58,7 @@ $num_rows = mysqli_num_rows($sql); @@ -105,7 +105,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -164,4 +171,3 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -85,7 +85,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -141,7 +141,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - +
- + - + +
- + +
@@ -894,10 +889,10 @@ ob_start(); diff --git a/agent/modals/contact/contact_edit.php b/agent/modals/contact/contact_edit.php index d258ace5..18ad5e0a 100644 --- a/agent/modals/contact/contact_edit.php +++ b/agent/modals/contact/contact_edit.php @@ -10,7 +10,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1" ); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $client_id = intval($row['contact_client_id']); $contact_name = nullable_htmlentities($row['contact_name']); $contact_title = nullable_htmlentities($row['contact_title']); @@ -38,7 +38,7 @@ $contact_user_id = intval($row['contact_user_id']); // Tags $contact_tag_id_array = array(); $sql_contact_tags = mysqli_query($mysqli, "SELECT tag_id FROM contact_tags WHERE contact_id = $contact_id"); -while ($row = mysqli_fetch_array($sql_contact_tags)) { +while ($row = mysqli_fetch_assoc($sql_contact_tags)) { $contact_tag_id = intval($row['tag_id']); $contact_tag_id_array[] = $contact_tag_id; } @@ -133,7 +133,7 @@ ob_start();
- +
@@ -169,7 +169,7 @@ ob_start(); @@ -377,4 +377,3 @@ $(document).ready(function() { require_once '../../../includes/modal_footer.php'; ?> - diff --git a/agent/modals/contact/contact_link_asset.php b/agent/modals/contact/contact_link_asset.php index 1db6dbe8..0443126e 100644 --- a/agent/modals/contact/contact_link_asset.php +++ b/agent/modals/contact/contact_link_asset.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); @@ -44,7 +44,7 @@ ob_start(); AND asset_archived_at IS NULL ORDER BY asset_name ASC "); - while ($row = mysqli_fetch_array($sql_assets_select)) { + while ($row = mysqli_fetch_assoc($sql_assets_select)) { $asset_id = intval($row['asset_id']); $asset_name = nullable_htmlentities($row['asset_name']); ?> diff --git a/agent/modals/contact/contact_link_credential.php b/agent/modals/contact/contact_link_credential.php index a4a8a4d4..5fffa77c 100644 --- a/agent/modals/contact/contact_link_credential.php +++ b/agent/modals/contact/contact_link_credential.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); @@ -44,7 +44,7 @@ ob_start(); AND credential_archived_at IS NULL ORDER BY credential_name ASC "); - while ($row = mysqli_fetch_array($sql_credentials_select)) { + while ($row = mysqli_fetch_assoc($sql_credentials_select)) { $credential_id = intval($row['credential_id']); $credential_name = nullable_htmlentities($row['credential_name']); ?> diff --git a/agent/modals/contact/contact_link_document.php b/agent/modals/contact/contact_link_document.php index ac5f54c7..946f8ecb 100644 --- a/agent/modals/contact/contact_link_document.php +++ b/agent/modals/contact/contact_link_document.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); @@ -47,7 +47,7 @@ ob_start(); AND contact_documents.contact_id IS NULL ORDER BY documents.document_name ASC "); - while ($row = mysqli_fetch_array($sql_documents_select)) { + while ($row = mysqli_fetch_assoc($sql_documents_select)) { $document_id = intval($row['document_id']); $document_name = nullable_htmlentities($row['document_name']); ?> diff --git a/agent/modals/contact/contact_link_file.php b/agent/modals/contact/contact_link_file.php index 2cb882c2..a12d2e3a 100644 --- a/agent/modals/contact/contact_link_file.php +++ b/agent/modals/contact/contact_link_file.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); @@ -49,7 +49,7 @@ ob_start(); ORDER BY folders.folder_name ASC, files.file_name ASC "); - while ($row = mysqli_fetch_array($sql_files_select)) { + while ($row = mysqli_fetch_assoc($sql_files_select)) { $file_id = intval($row['file_id']); $file_name = nullable_htmlentities($row['file_name']); $folder_name = nullable_htmlentities($row['folder_name']); diff --git a/agent/modals/contact/contact_link_service.php b/agent/modals/contact/contact_link_service.php index 124dd53e..e8d8e447 100644 --- a/agent/modals/contact/contact_link_service.php +++ b/agent/modals/contact/contact_link_service.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); @@ -46,7 +46,7 @@ ob_start(); AND service_contacts.contact_id IS NULL ORDER BY services.service_name ASC "); - while ($row = mysqli_fetch_array($sql_services_select)) { + while ($row = mysqli_fetch_assoc($sql_services_select)) { $service_id = intval($row['service_id']); $service_name = nullable_htmlentities($row['service_name']); ?> diff --git a/agent/modals/contact/contact_link_software.php b/agent/modals/contact/contact_link_software.php index c08ef77e..f53cac9f 100644 --- a/agent/modals/contact/contact_link_software.php +++ b/agent/modals/contact/contact_link_software.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); @@ -48,7 +48,7 @@ ob_start(); AND software_contacts.contact_id IS NULL ORDER BY software.software_name ASC "); - while ($row = mysqli_fetch_array($sql_software_select)) { + while ($row = mysqli_fetch_assoc($sql_software_select)) { $software_id = intval($row['software_id']); $software_name = nullable_htmlentities($row['software_name']); ?> diff --git a/agent/modals/contact/contact_note_add.php b/agent/modals/contact/contact_note_add.php index 1b38d210..fefaf7df 100644 --- a/agent/modals/contact/contact_note_add.php +++ b/agent/modals/contact/contact_note_add.php @@ -5,7 +5,7 @@ require_once '../../../includes/modal_header.php'; $contact_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT contact_name FROM contacts WHERE contact_id = $contact_id LIMIT 1"); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); // Generate the HTML form content using output buffering. diff --git a/agent/modals/credential/credential_add.php b/agent/modals/credential/credential_add.php index 3392bdf5..46710e89 100644 --- a/agent/modals/credential/credential_add.php +++ b/agent/modals/credential/credential_add.php @@ -16,7 +16,7 @@ ob_start();
- + @@ -165,7 +167,7 @@ ob_start(); @@ -192,7 +194,7 @@ ob_start(); diff --git a/agent/modals/credential/credential_bulk_assign_tags.php b/agent/modals/credential/credential_bulk_assign_tags.php index c0ed149f..abe06b92 100644 --- a/agent/modals/credential/credential_bulk_assign_tags.php +++ b/agent/modals/credential/credential_bulk_assign_tags.php @@ -37,7 +37,7 @@ ob_start(); diff --git a/agent/modals/credential/credential_edit.php b/agent/modals/credential/credential_edit.php index 6ddef00e..98ce375b 100644 --- a/agent/modals/credential/credential_edit.php +++ b/agent/modals/credential/credential_edit.php @@ -6,7 +6,7 @@ $credential_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM credentials WHERE credential_id = $credential_id LIMIT 1"); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $client_id = intval($row['credential_client_id']); $credential_name = nullable_htmlentities($row['credential_name']); $credential_description = nullable_htmlentities($row['credential_description']); @@ -20,14 +20,14 @@ $credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']); $credential_note = nullable_htmlentities($row['credential_note']); $credential_created_at = nullable_htmlentities($row['credential_created_at']); $credential_archived_at = nullable_htmlentities($row['credential_archived_at']); -$credential_important = intval($row['credential_important']); +$credential_favorite = intval($row['credential_favorite']); $credential_contact_id = intval($row['credential_contact_id']); $credential_asset_id = intval($row['credential_asset_id']); // Tags $credential_tag_id_array = array(); $sql_credential_tags = mysqli_query($mysqli, "SELECT tag_id FROM credential_tags WHERE credential_id = $credential_id"); -while ($row = mysqli_fetch_array($sql_credential_tags)) { +while ($row = mysqli_fetch_assoc($sql_credential_tags)) { $credential_tag_id = intval($row['tag_id']); $credential_tag_id_array[] = $credential_tag_id; } @@ -75,7 +75,13 @@ ob_start();
- > +
@@ -178,7 +184,7 @@ ob_start(); @@ -199,7 +205,7 @@ ob_start(); diff --git a/agent/modals/credential/credential_view.php b/agent/modals/credential/credential_view.php index 474564fa..33dd3509 100644 --- a/agent/modals/credential/credential_view.php +++ b/agent/modals/credential/credential_view.php @@ -5,8 +5,8 @@ require_once '../../../includes/modal_header.php'; $credential_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM credentials WHERE credential_id = $credential_id LIMIT 1"); - -$row = mysqli_fetch_array($sql); + +$row = mysqli_fetch_assoc($sql); $credential_name = nullable_htmlentities($row['credential_name']); $credential_description = nullable_htmlentities($row['credential_description']); $credential_uri = nullable_htmlentities($row['credential_uri']); diff --git a/agent/modals/document/document_add_file_relation.php b/agent/modals/document/document_add_file_relation.php index 8a986ead..32816119 100644 --- a/agent/modals/document/document_add_file_relation.php +++ b/agent/modals/document/document_add_file_relation.php @@ -20,10 +20,10 @@
-
-
-
- -
- -
-
-
diff --git a/agent/modals/document/document_edit_visibility.php b/agent/modals/document/document_edit_visibility.php index 2234a6fc..6241a2c4 100644 --- a/agent/modals/document/document_edit_visibility.php +++ b/agent/modals/document/document_edit_visibility.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM documents LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $document_client_visible = intval($row['document_client_visible']); $client_id = intval($row['document_client_id']); diff --git a/agent/modals/document/document_link_asset.php b/agent/modals/document/document_link_asset.php index b8eca7b6..cab4660a 100644 --- a/agent/modals/document/document_link_asset.php +++ b/agent/modals/document/document_link_asset.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM documents LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $client_id = intval($row['document_client_id']); @@ -45,7 +45,7 @@ ob_start(); AND asset_documents.asset_id IS NULL ORDER BY asset_name ASC "); - while ($row = mysqli_fetch_array($sql_assets_select)) { + while ($row = mysqli_fetch_assoc($sql_assets_select)) { $asset_id = intval($row['asset_id']); $asset_name = nullable_htmlentities($row['asset_name']); diff --git a/agent/modals/document/document_link_contact.php b/agent/modals/document/document_link_contact.php index 07d715c9..74cb85d9 100644 --- a/agent/modals/document/document_link_contact.php +++ b/agent/modals/document/document_link_contact.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM documents LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $client_id = intval($row['document_client_id']); @@ -46,7 +46,7 @@ ob_start(); AND contact_documents.contact_id IS NULL ORDER BY contact_name ASC "); - while ($row = mysqli_fetch_array($sql_contacts_select)) { + while ($row = mysqli_fetch_assoc($sql_contacts_select)) { $contact_id = intval($row['contact_id']); $contact_name = nullable_htmlentities($row['contact_name']); diff --git a/agent/modals/document/document_link_file.php b/agent/modals/document/document_link_file.php index 213099b7..18986935 100644 --- a/agent/modals/document/document_link_file.php +++ b/agent/modals/document/document_link_file.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM documents LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $client_id = intval($row['document_client_id']); @@ -48,7 +48,7 @@ ob_start(); AND document_files.file_id IS NULL ORDER BY folder_name ASC, file_name ASC "); - while ($row = mysqli_fetch_array($sql_files_select)) { + while ($row = mysqli_fetch_assoc($sql_files_select)) { $file_id = intval($row['file_id']); $file_name = nullable_htmlentities($row['file_name']); $folder_name = nullable_htmlentities($row['folder_name']); diff --git a/agent/modals/document/document_link_software.php b/agent/modals/document/document_link_software.php index d0474485..4e13f146 100644 --- a/agent/modals/document/document_link_software.php +++ b/agent/modals/document/document_link_software.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM documents LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $client_id = intval($row['document_client_id']); @@ -47,7 +47,7 @@ ob_start(); ORDER BY software_name ASC "); - while ($row = mysqli_fetch_array($sql_software_select)) { + while ($row = mysqli_fetch_assoc($sql_software_select)) { $software_id = intval($row['software_id']); $software_name = nullable_htmlentities($row['software_name']); diff --git a/agent/modals/document/document_link_vendor.php b/agent/modals/document/document_link_vendor.php index ea5079dc..1bdec19d 100644 --- a/agent/modals/document/document_link_vendor.php +++ b/agent/modals/document/document_link_vendor.php @@ -9,7 +9,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM documents LIMIT 1 "); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $client_id = intval($row['document_client_id']); @@ -46,7 +46,7 @@ ob_start(); AND vendor_documents.vendor_id IS NULL ORDER BY vendor_name ASC "); - while ($row = mysqli_fetch_array($sql_vendors_select)) { + while ($row = mysqli_fetch_assoc($sql_vendors_select)) { $vendor_id = intval($row['vendor_id']); $vendor_name = nullable_htmlentities($row['vendor_name']); diff --git a/agent/modals/document/document_move.php b/agent/modals/document/document_move.php index f50d130d..f68429b0 100644 --- a/agent/modals/document/document_move.php +++ b/agent/modals/document/document_move.php @@ -5,8 +5,8 @@ require_once '../../../includes/modal_header.php'; $document_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_id = $document_id LIMIT 1"); - -$row = mysqli_fetch_array($sql); + +$row = mysqli_fetch_assoc($sql); $client_id = intval($row['document_client_id']); $document_folder_id = nullable_htmlentities($row['document_folder_id']); $document_name = nullable_htmlentities($row['document_name']); @@ -35,7 +35,7 @@ ob_start(); purify($row['document_version_content']); diff --git a/agent/modals/document/document_view.php b/agent/modals/document/document_view.php index 6a4c84a2..9d7da415 100644 --- a/agent/modals/document/document_view.php +++ b/agent/modals/document/document_view.php @@ -13,8 +13,8 @@ $purifier = new HTMLPurifier($purifier_config); $document_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_id = $document_id LIMIT 1"); - -$row = mysqli_fetch_array($sql); + +$row = mysqli_fetch_assoc($sql); $document_name = nullable_htmlentities($row['document_name']); $document_content = $purifier->purify($row['document_content']); diff --git a/agent/modals/domain/domain_add.php b/agent/modals/domain/domain_add.php index 7a36a543..ca945bdf 100644 --- a/agent/modals/domain/domain_add.php +++ b/agent/modals/domain/domain_add.php @@ -23,7 +23,7 @@ ob_start(); - +
@@ -47,7 +47,7 @@ ob_start(); @@ -94,7 +94,7 @@ ob_start(); @@ -115,7 +115,7 @@ ob_start(); @@ -136,7 +136,7 @@ ob_start(); @@ -157,7 +157,7 @@ ob_start(); @@ -187,7 +187,7 @@ ob_start(); - + - diff --git a/agent/modals/invoice/invoice_bulk_edit_category.php b/agent/modals/invoice/invoice_bulk_edit_category.php index 93ab1d5d..edc05142 100644 --- a/agent/modals/invoice/invoice_bulk_edit_category.php +++ b/agent/modals/invoice/invoice_bulk_edit_category.php @@ -33,7 +33,7 @@ ob_start(); diff --git a/agent/modals/invoice/invoice_copy.php b/agent/modals/invoice/invoice_copy.php index 76e938fb..0b286df3 100644 --- a/agent/modals/invoice/invoice_copy.php +++ b/agent/modals/invoice/invoice_copy.php @@ -6,7 +6,7 @@ $invoice_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM invoices LEFT JOIN clients ON invoice_client_id = client_id WHERE invoice_id = $invoice_id LIMIT 1"); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $invoice_prefix = nullable_htmlentities($row['invoice_prefix']); $invoice_number = intval($row['invoice_number']); $client_name = nullable_htmlentities($row['client_name']); @@ -23,7 +23,7 @@ ob_start(); - + - + - +
@@ -90,4 +90,3 @@
- diff --git a/agent/modals/software/software_add.php b/agent/modals/software/software_add.php index 23026366..6199fbb0 100644 --- a/agent/modals/software/software_add.php +++ b/agent/modals/software/software_add.php @@ -57,7 +57,7 @@ ob_start(); @@ -111,7 +111,7 @@ ob_start(); @@ -225,7 +225,7 @@ ob_start(); @@ -54,7 +54,7 @@ ob_start(); - Select Vendor - - @@ -233,7 +233,7 @@ ob_start(); '$software_created_at' OR asset_archived_at IS NULL) AND asset_client_id = $client_id ORDER BY asset_archived_at ASC, asset_name ASC"); - while ($row = mysqli_fetch_array($sql_assets_select)) { + while ($row = mysqli_fetch_assoc($sql_assets_select)) { $asset_id_select = intval($row['asset_id']); $asset_name_select = nullable_htmlentities($row['asset_name']); $asset_type_select = nullable_htmlentities($row['asset_type']); @@ -273,7 +273,7 @@ ob_start(); '$software_created_at' OR contact_archived_at IS NULL) AND contact_client_id = $client_id ORDER BY contact_archived_at ASC, contact_name ASC"); - while ($row = mysqli_fetch_array($sql_contacts_select)) { + while ($row = mysqli_fetch_assoc($sql_contacts_select)) { $contact_id_select = intval($row['contact_id']); $contact_name_select = nullable_htmlentities($row['contact_name']); $contact_email_select = nullable_htmlentities($row['contact_email']); diff --git a/agent/modals/ticket/ticket_add.php b/agent/modals/ticket/ticket_add.php index c1230edc..8e7cebf0 100644 --- a/agent/modals/ticket/ticket_add.php +++ b/agent/modals/ticket/ticket_add.php @@ -60,7 +60,7 @@ ob_start(); @@ -87,20 +87,20 @@ ob_start(); - Not Categorized - @@ -250,7 +250,7 @@ ob_start(); @@ -325,7 +325,7 @@ ob_start(); @@ -401,7 +401,7 @@ ob_start(); @@ -440,7 +440,7 @@ ob_start(); @@ -463,32 +463,25 @@ ob_start(); + diff --git a/agent/modals/ticket/ticket_add_v2.php b/agent/modals/ticket/ticket_add_v2.php index 9cc31e92..7113b253 100644 --- a/agent/modals/ticket/ticket_add_v2.php +++ b/agent/modals/ticket/ticket_add_v2.php @@ -18,7 +18,7 @@ ob_start();
- + @@ -58,20 +58,20 @@ ob_start(); - Not Categorized - @@ -158,7 +158,7 @@ ob_start(); - +
@@ -203,7 +203,7 @@ ob_start(); @@ -297,32 +297,24 @@ ob_start(); diff --git a/agent/modals/ticket/ticket_add_watcher.php b/agent/modals/ticket/ticket_add_watcher.php index 29b32491..ecfc783b 100644 --- a/agent/modals/ticket/ticket_add_watcher.php +++ b/agent/modals/ticket/ticket_add_watcher.php @@ -29,7 +29,7 @@ ob_start(); '' ORDER BY contact_name ASC"); - while ($row = mysqli_fetch_array($sql_client_contacts_select)) { + while ($row = mysqli_fetch_assoc($sql_client_contacts_select)) { $contact_id_select = intval($row['contact_id']); $contact_name_select = nullable_htmlentities($row['contact_name']); $contact_email_select = nullable_htmlentities($row['contact_email']); diff --git a/agent/modals/ticket/ticket_assign.php b/agent/modals/ticket/ticket_assign.php index 40492fa0..13ab1ad3 100644 --- a/agent/modals/ticket/ticket_assign.php +++ b/agent/modals/ticket/ticket_assign.php @@ -10,7 +10,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM tickets LIMIT 1" ); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $ticket_prefix = nullable_htmlentities($row['ticket_prefix']); $ticket_number = intval($row['ticket_number']); $ticket_assigned_to = intval($row['ticket_assigned_to']); @@ -42,14 +42,14 @@ ob_start();
- - - -
- -
- - - diff --git a/agent/modals/ticket/ticket_change_client.php b/agent/modals/ticket/ticket_change_client.php index 1d013525..09c12653 100644 --- a/agent/modals/ticket/ticket_change_client.php +++ b/agent/modals/ticket/ticket_change_client.php @@ -5,7 +5,7 @@ $ticket_id = intval($_GET['ticket_id']); $sql = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_id = $ticket_id LIMIT 1"); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $ticket_prefix = nullable_htmlentities($row['ticket_prefix']); $ticket_number = intval($row['ticket_number']); $client_id = intval($row['ticket_client_id']); @@ -36,7 +36,7 @@ ob_start(); - diff --git a/agent/modals/ticket/ticket_edit_schedule.php b/agent/modals/ticket/ticket_edit_schedule.php index 877ac3e9..1a2148bc 100644 --- a/agent/modals/ticket/ticket_edit_schedule.php +++ b/agent/modals/ticket/ticket_edit_schedule.php @@ -10,7 +10,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM tickets LIMIT 1" ); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $ticket_prefix = nullable_htmlentities($row['ticket_prefix']); $ticket_number = intval($row['ticket_number']); $ticket_scheduled_for = nullable_htmlentities($row['ticket_schedule']); diff --git a/agent/modals/ticket/ticket_edit_vendor.php b/agent/modals/ticket/ticket_edit_vendor.php index ada9836c..85b048fa 100644 --- a/agent/modals/ticket/ticket_edit_vendor.php +++ b/agent/modals/ticket/ticket_edit_vendor.php @@ -5,7 +5,7 @@ $ticket_id = intval($_GET['ticket_id']); $sql = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_id = $ticket_id LIMIT 1"); -$row = mysqli_fetch_array($sql); +$row = mysqli_fetch_assoc($sql); $ticket_prefix = nullable_htmlentities($row['ticket_prefix']); $ticket_number = intval($row['ticket_number']); $vendor_id = intval($row['ticket_vendor_id']); @@ -37,7 +37,7 @@ ob_start(); diff --git a/agent/modals/ticket/ticket_invoice_add.php b/agent/modals/ticket/ticket_invoice_add.php index 4cba203b..001a4758 100644 --- a/agent/modals/ticket/ticket_invoice_add.php +++ b/agent/modals/ticket/ticket_invoice_add.php @@ -19,7 +19,7 @@ $ticket_sql = mysqli_query( LIMIT 1" ); -$row = mysqli_fetch_array($ticket_sql); +$row = mysqli_fetch_assoc($ticket_sql); $client_id = intval($row['client_id']); $client_rate = floatval($row['client_rate']); $ticket_prefix = nullable_htmlentities($row['ticket_prefix']); @@ -33,16 +33,16 @@ $ticket_onsite = intval($row['ticket_onsite']); $ticket_created_at = nullable_htmlentities($row['ticket_created_at']); $ticket_created_by = intval($row['ticket_created_by']); -$ticket_date = date('Y-m-d', strtotime($ticket_created_at)); +$ticket_date = date('Y-m-d g:i A', strtotime($ticket_created_at)); $ticket_first_response_at = nullable_htmlentities($row['ticket_first_response_at']); if ($ticket_first_response_at) { - $ticket_first_response_date_time = date('Y-m-d H:i', strtotime($ticket_first_response_at)); + $ticket_first_response_date_time = date('Y-m-d g:i A', strtotime($ticket_first_response_at)); } else { $ticket_first_response_date_time = ''; } $ticket_resolved_at = nullable_htmlentities($row['ticket_resolved_at']); if ($ticket_resolved_at) { - $ticket_resolved_date = date('Y-m-d', strtotime($ticket_resolved_at)); + $ticket_resolved_date = date('Y-m-d g:i A', strtotime($ticket_resolved_at)); } else { $ticket_resolved_date = ''; } @@ -71,8 +71,9 @@ $location_phone = formatPhoneNumber($row['location_phone']); //Get Total Ticket Time $ticket_total_reply_time = mysqli_query($mysqli, "SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(ticket_reply_time_worked))) AS ticket_total_reply_time FROM ticket_replies WHERE ticket_reply_archived_at IS NULL AND ticket_reply_ticket_id = $ticket_id"); -$row = mysqli_fetch_array($ticket_total_reply_time); +$row = mysqli_fetch_assoc($ticket_total_reply_time); $ticket_total_reply_time = nullable_htmlentities($row['ticket_total_reply_time']); +$ticket_total_reply_time_display = formatDuration($ticket_total_reply_time); $sql_invoices = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_status LIKE 'Draft' AND invoice_client_id = $client_id ORDER BY invoice_number ASC"); @@ -122,7 +123,7 @@ ob_start(); @@ -221,15 +222,17 @@ ob_start();
-
- -
-
-
+
+
+
+
+
- -
-
+ +
+
+
@@ -666,14 +640,14 @@ if (isset($_GET['ticket_id'])) {
- -
-
- -
-
-
+ +
+
+ +
+
+
@@ -684,7 +658,7 @@ if (isset($_GET['ticket_id'])) { purify($row['ticket_reply']); $ticket_reply_type = nullable_htmlentities($row['ticket_reply_type']); @@ -705,7 +679,7 @@ if (isset($_GET['ticket_id'])) { $user_avatar = nullable_htmlentities($row['user_avatar']); $user_initials = initials($row['user_name']); $avatar_link = "../uploads/users/$user_id/$user_avatar"; - $ticket_reply_time_worked = date_create($row['ticket_reply_time_worked']); + $ticket_reply_time_worked = $row['ticket_reply_time_worked']; } $sql_ticket_reply_attachments = mysqli_query( @@ -732,12 +706,19 @@ if (isset($_GET['ticket_id'])) { -
+

- +
-
Time worked: +
+ + + Time worked: + + + +
@@ -789,7 +770,7 @@ if (isset($_GET['ticket_id'])) { $name | Download | View"; @@ -809,10 +790,10 @@ if (isset($_GET['ticket_id'])) {
- -
"> -
-
Ticket Details
+ +
+
+
Activity Summary
-
+
-
- Created: +
+ Created: + ()
- -
- Created by: +
+ Created by:
- -
- Source: + +
+ Source:
- 0) { ?> -
- Category: + +
+ Category:
-
- FR: +
+ 1st resp:
-
- Time worked: +
+ Total time:
@@ -875,34 +857,34 @@ if (isset($_GET['ticket_id'])) { - +
-
- Resolved: +
+ Resolved:
- -
- Closed by: +
+ Closed by:
-
- Closed: +
+ Closed:
-
- Feedback: +
+ Feedback:
@@ -916,8 +898,8 @@ if (isset($_GET['ticket_id'])) { 0)) { ?>
-
-
Tasks
+
+
Tasks
= 2) { ?>