diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a75c8c..f09eb2bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,43 @@ This file documents all notable changes made to ITFlow. +## [25.06] + +### Breaking CHANGES +- Old Document Verions will be deleted due to the major backend rewrite how document versions work. + +### Added / Changed +- Improved function for retrieving remote IP address for logging purposes. +- Ticket categories are now sorted alphabetically. +- Visiting a deleted invoice or recurring invoice now redirects to the listing page; delete option added to invoice details page. +- Added "Mark as Sent" and "Make Payment" actions directly on the invoice listing page. +- Introduced Ticket Category UI for recurring tickets. +- In Project Details, bulk actions and sorting are now available for tickets. +- Updated ticket details UI to use full card stacks with edit icons for stackable items (e.g., asset, watchers, contact). +- Added a new setting to toggle AutoStart Timer in ticket details (disabled by default). +- Applied gray accent theme in the client section to visually distinguish from the global view. +- Introduced Ticket Due Date functionality (currently supports add/edit only; more updates coming next release). +- Added settings option to display Company Tax ID on invoices. +- Client overview now displays badge counts for all entities. +- Overhauled UI for Invoice, Quote, and Recurring Invoice details; switched PDF generation to TCPDF PHP from PDFMake JS. +- Document versioning has been moved to a separate backend table to resolve permanent link issues -- SEE Breaking CHANGES. +- Migrated Document Templates, Vendor Templates, and Software/License Templates to dedicated tables. +- Added functionality to mark all tasks in a ticket as complete or incomplete. +- Asset CSV import now supports a purchase date field. +- Recurring Payments have been restructured to auto-charge on the invoice due date instead of at generation time. +- Added "Base Template" label for vendor templates when available. +- Backup and restore processes now use a temporary directory; files are cleaned up automatically if operations fail. +- Added confirmation prompt when accepting or declining a quote. +- Other minor code UI/UX cleanups and refactoring throughout the app. + +### Fixed +- Resolved issue with enabling MFA. +- Fixed UI regression where ticket listing columns would misalign. +- Non-billable invoices are no longer included in calculations. +- Addressed multiple minor reported security vulnerabilities. +- Tickets with open tasks are no longer resolved in bulk; a warning is shown along with a count of affected tickets. + + ## [25.05.1] ### Added / Changed diff --git a/accounts.php b/accounts.php index 51025e27..d1b2aecc 100644 --- a/accounts.php +++ b/accounts.php @@ -9,9 +9,6 @@ require_once "includes/inc_all.php"; // Perms enforceUserPermission('module_financial'); -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM accounts diff --git a/admin_api.php b/admin_api.php index b018f48a..7b70d09f 100644 --- a/admin_api.php +++ b/admin_api.php @@ -6,10 +6,6 @@ $order = "ASC"; require_once "includes/inc_all_admin.php"; - -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM api_keys diff --git a/admin_app_log.php b/admin_app_log.php index ec30f510..d98afbb0 100644 --- a/admin_app_log.php +++ b/admin_app_log.php @@ -26,9 +26,6 @@ if (isset($_GET['category']) & !empty($_GET['catergory'])) { $category_filter = ''; } -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM app_logs diff --git a/admin_audit_log.php b/admin_audit_log.php index 9f61b0b1..04b1a41b 100644 --- a/admin_audit_log.php +++ b/admin_audit_log.php @@ -46,9 +46,6 @@ if (isset($_GET['action']) & !empty($_GET['action'])) { $action_filter = ''; } -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM logs diff --git a/admin_category.php b/admin_category.php index 18bfa5c5..4370b5d4 100644 --- a/admin_category.php +++ b/admin_category.php @@ -13,10 +13,6 @@ if (isset($_GET['category'])) { $category = "Expense"; } -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM categories diff --git a/admin_custom_link.php b/admin_custom_link.php index b5e1ebf6..b87ff102 100644 --- a/admin_custom_link.php +++ b/admin_custom_link.php @@ -6,10 +6,6 @@ $order = "ASC"; require_once "includes/inc_all_admin.php"; - -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM custom_links diff --git a/admin_document_template.php b/admin_document_template.php index c2181e93..4b0b6e5d 100644 --- a/admin_document_template.php +++ b/admin_document_template.php @@ -1,27 +1,16 @@ "> - - Template Name + + Template Name - - Created + + Created - - Updated + + Updated @@ -78,27 +67,26 @@ - -
+ +
- -
+ +
- + diff --git a/admin_document_template_details.php b/admin_document_template_details.php index 355641c2..0d638d55 100644 --- a/admin_document_template_details.php +++ b/admin_document_template_details.php @@ -11,19 +11,19 @@ $purifier_config->set('Cache.DefinitionImpl', null); // Disable cache by setting $purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]); $purifier = new HTMLPurifier($purifier_config); -if (isset($_GET['document_id'])) { - $document_id = intval($_GET['document_id']); +if (isset($_GET['document_template_id'])) { + $document_template_id = intval($_GET['document_template_id']); } -$sql_document = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_template = 1 AND document_id = $document_id"); +$sql_document = mysqli_query($mysqli, "SELECT * FROM document_templates WHERE document_template_id = $document_template_id"); $row = mysqli_fetch_array($sql_document); -$document_name = nullable_htmlentities($row['document_name']); -$document_description = nullable_htmlentities($row['document_description']); -$document_content = $purifier->purify($row['document_content']); -$document_created_at = nullable_htmlentities($row['document_created_at']); -$document_updated_at = nullable_htmlentities($row['document_updated_at']); +$document_template_name = nullable_htmlentities($row['document_template_name']); +$document_template_description = nullable_htmlentities($row['document_template_description']); +$document_template_content = $purifier->purify($row['document_template_content']); +$document_template_created_at = nullable_htmlentities($row['document_template_created_at']); +$document_template_updated_at = nullable_htmlentities($row['document_template_updated_at']); ?> @@ -37,27 +37,27 @@ $document_updated_at = nullable_htmlentities($row['document_updated_at']); - +
-

+

- +
diff --git a/admin_mail_queue.php b/admin_mail_queue.php index 5259ce96..1bf65065 100644 --- a/admin_mail_queue.php +++ b/admin_mail_queue.php @@ -6,9 +6,6 @@ $order = "DESC"; require_once "includes/inc_all_admin.php"; -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM email_queue diff --git a/admin_project_template.php b/admin_project_template.php index 1871cff6..c719d5b2 100644 --- a/admin_project_template.php +++ b/admin_project_template.php @@ -6,10 +6,6 @@ $order = "ASC"; require_once "includes/inc_all_admin.php"; - -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM project_templates diff --git a/admin_role.php b/admin_role.php index 7726f3e1..23aa2dbb 100644 --- a/admin_role.php +++ b/admin_role.php @@ -6,10 +6,6 @@ $order = "DESC"; require_once "includes/inc_all_admin.php"; - -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM user_roles diff --git a/admin_settings_company.php b/admin_settings_company.php index 17ba0239..6d5a548f 100644 --- a/admin_settings_company.php +++ b/admin_settings_company.php @@ -19,6 +19,7 @@ $company_website = nullable_htmlentities($row['company_website']); $company_logo = nullable_htmlentities($row['company_logo']); $company_locale = nullable_htmlentities($row['company_locale']); $company_currency = nullable_htmlentities($row['company_currency']); +$company_tax_id = nullable_htmlentities($row['company_tax_id']); $company_initials = nullable_htmlentities(initials($company_name)); @@ -146,6 +147,16 @@ $company_initials = nullable_htmlentities(initials($company_name)); +
+ +
+
+ +
+ +
+
+
diff --git a/admin_settings_custom_fields.php b/admin_settings_custom_fields.php index b1b761a1..8bf5bfe3 100644 --- a/admin_settings_custom_fields.php +++ b/admin_settings_custom_fields.php @@ -13,9 +13,6 @@ if (isset($_GET['table'])) { $table = "client_assets"; } -//Rebuild URL -$url_query_strings_sort = http_build_query($get_copy); - $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM custom_fields diff --git a/admin_settings_invoice.php b/admin_settings_invoice.php index 9633c3eb..cb432452 100644 --- a/admin_settings_invoice.php +++ b/admin_settings_invoice.php @@ -37,12 +37,21 @@ require_once "includes/inc_all_admin.php"; +
Show Tax ID On Invoices
+ +
+
+ value="1" id="customSwitch1"> + +
+
+
Invoice Late Fees
-
+
- value="1" id="customSwitch1"> - + value="1" id="customSwitch2"> +
diff --git a/admin_settings_online_payment.php b/admin_settings_online_payment.php index b8aa5a4e..ac288b79 100644 --- a/admin_settings_online_payment.php +++ b/admin_settings_online_payment.php @@ -76,7 +76,7 @@ require_once "includes/inc_all_admin.php"; +
+
+ value="1" id="ticketTimerSwitch"> + +
+
+
diff --git a/admin_software_template.php b/admin_software_template.php index 27f92b77..7091f3d2 100644 --- a/admin_software_template.php +++ b/admin_software_template.php @@ -1,20 +1,15 @@ "> - - Template + + Template - - Type + + Type - - License Type + + License Type Action @@ -74,41 +69,41 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - +
-
$software_version"; ?>
-
+
$software_template_version"; ?>
+
- - + +
-
+
-
+
-
+
- +
- +
@@ -315,19 +315,19 @@ ob_start();
-
+
-
+
-
+
-
+
-
+
diff --git a/ajax/ajax_contact_details.php b/ajax/ajax_contact_details.php index bd91b576..51230c9a 100644 --- a/ajax/ajax_contact_details.php +++ b/ajax/ajax_contact_details.php @@ -125,7 +125,6 @@ $sql_linked_documents = mysqli_query($mysqli, "SELECT * FROM contact_documents, LEFT JOIN users ON document_created_by = user_id WHERE contact_documents.contact_id = $contact_id AND contact_documents.document_id = documents.document_id - AND document_template = 0 AND document_archived_at IS NULL ORDER BY document_name ASC" ); diff --git a/ajax/ajax_credential_edit.php b/ajax/ajax_credential_edit.php index ea132dfe..3b25b61e 100644 --- a/ajax/ajax_credential_edit.php +++ b/ajax/ajax_credential_edit.php @@ -12,6 +12,8 @@ $credential_name = nullable_htmlentities($row['credential_name']); $credential_description = nullable_htmlentities($row['credential_description']); $credential_uri = nullable_htmlentities($row['credential_uri']); $credential_uri_2 = nullable_htmlentities($row['credential_uri_2']); +$credential_uri_link = sanitize_url($row['credential_uri']); +$credential_uri_2_link = sanitize_url($row['credential_uri_2']); $credential_username = nullable_htmlentities(decryptCredentialEntry($row['credential_username'])); $credential_password = nullable_htmlentities(decryptCredentialEntry($row['credential_password'])); $credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']); @@ -137,7 +139,7 @@ ob_start();
- +
@@ -153,7 +155,7 @@ ob_start();
- +
diff --git a/ajax/ajax_document_edit.php b/ajax/ajax_document_edit.php index 11e2de79..1bf4a163 100644 --- a/ajax/ajax_document_edit.php +++ b/ajax/ajax_document_edit.php @@ -10,12 +10,7 @@ $row = mysqli_fetch_array($sql); $document_name = nullable_htmlentities($row['document_name']); $document_description = nullable_htmlentities($row['document_description']); $document_content = nullable_htmlentities($row['document_content']); -$document_created_by_id = intval($row['document_created_by']); -$document_created_at = nullable_htmlentities($row['document_created_at']); -$document_updated_at = nullable_htmlentities($row['document_updated_at']); -$document_archived_at = nullable_htmlentities($row['document_archived_at']); $document_folder_id = intval($row['document_folder_id']); -$document_parent = intval($row['document_parent']); $document_client_visible = intval($row['document_client_visible']); $client_id = intval($row['document_client_id']); @@ -30,10 +25,8 @@ ob_start();
- - + -
-
- -
-
- +
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
-
diff --git a/ajax/ajax_service_details.php b/ajax/ajax_service_details.php index 3c26234a..8c386fba 100644 --- a/ajax/ajax_service_details.php +++ b/ajax/ajax_service_details.php @@ -5,7 +5,6 @@ require_once '../includes/ajax_header.php'; $service_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM services WHERE service_id = $service_id LIMIT 1"); - $row = mysqli_fetch_array($sql); $service_name = nullable_htmlentities($row['service_name']); $service_description = nullable_htmlentities($row['service_description']); @@ -17,6 +16,7 @@ $service_created_at = nullable_htmlentities($row['service_created_at']); $service_updated_at = nullable_htmlentities($row['service_updated_at']); $service_review_due = nullable_htmlentities($row['service_review_due']); $client_id = intval($row['service_client_id']); + // Service Importance if ($service_importance == "High") { $service_importance_display = "$service_importance"; @@ -55,6 +55,7 @@ $sql_domains = mysqli_query( LEFT JOIN domains ON service_domains.domain_id = domains.domain_id WHERE service_id = $service_id" ); + // Associated Certificates $sql_certificates = mysqli_query( $mysqli, @@ -63,10 +64,6 @@ $sql_certificates = mysqli_query( WHERE service_id = $service_id" ); -// Associated URLs ---- REMOVED for now -//$sql_urls = mysqli_query($mysqli, "SELECT * FROM service_urls -//WHERE service_id = '$service_id'"); - // Associated Vendors $sql_vendors = mysqli_query( $mysqli, @@ -116,149 +113,99 @@ ob_start(); 0) { ?> -
Assets
- - 0) { + echo "
Assets
    "; + mysqli_data_seek($sql_assets, 0); + while ($row = mysqli_fetch_array($sql_assets)) { + $asset_id = intval($row['asset_id']); + $asset_name = nullable_htmlentities($row['asset_name']); + $ip = !empty($row['interface_ip']) ? '(' . nullable_htmlentities($row['interface_ip']) . ')' : ''; + echo "
  • $asset_name$ip
  • "; + } + echo "
"; } ?> -
Networks
-
    - Networks
      "; + foreach ($networks as $network) { + $network_parts = explode(":", $network); + $network_name = $network_parts[0]; + $network_vlan = $network_parts[1] ?? ''; + echo "
    • $network_name (VLAN $network_vlan)
    • "; + } + echo "
    "; } - foreach($networks as $network) { - $network = explode(":", $network); - echo "
  • $network[0] (VLAN $network[1])
  • "; - } - - ?> -
- -
Locations
-
    - Locations
      "; + foreach ($location_names as $location) { + echo "
    • $location
    • "; + } + echo "
    "; } - foreach($location_names as $location) { - echo "
  • $location
  • "; - } - ?> -
- 0) { ?> -
Domains
-
    - $row[domain_name]"; - } + if (mysqli_num_rows($sql_domains) > 0) { + echo "
    Domains
      "; + mysqli_data_seek($sql_domains, 0); + while ($row = mysqli_fetch_array($sql_domains)) { + if (!empty($row['domain_name'])) { + $domain_name = nullable_htmlentities($row['domain_name']); + echo "
    • $domain_name
    • "; } - ?> -
    - "; } ?> 0) { ?> -
    Certificates
    -
      - $row[certificate_name] ($row[certificate_domain])"; - } + if (mysqli_num_rows($sql_certificates) > 0) { + echo "
      Certificates
        "; + mysqli_data_seek($sql_certificates, 0); + while ($row = mysqli_fetch_array($sql_certificates)) { + if (!empty($row['certificate_name'])) { + $certificate_name = nullable_htmlentities($row['certificate_name']); + $certificate_domain = nullable_htmlentities($row['certificate_domain']); + echo "
      • $certificate_name ($certificate_domain)
      • "; } - ?> -
      - "; } ?>
-
@@ -267,148 +214,96 @@ ob_start(); 0) { ?> -
Vendors
- - 0) { + echo "
Vendors
    "; + mysqli_data_seek($sql_vendors, 0); + while ($row = mysqli_fetch_array($sql_vendors)) { + $vendor_id = intval($row['vendor_id']); + $vendor_name = nullable_htmlentities($row['vendor_name']); + echo "
  • $vendor_name
  • "; + } + echo "
"; } ?> 0) { ?> -
Contacts
- - 0) { + echo "
Contacts
    "; + mysqli_data_seek($sql_contacts, 0); + while ($row = mysqli_fetch_array($sql_contacts)) { + $contact_id = intval($row['contact_id']); + $contact_name = nullable_htmlentities($row['contact_name']); + echo "
  • $contact_name
  • "; + } + echo "
"; } ?> 0 || mysqli_num_rows($sql_credentials) > 0) { ?> -
Credentials
-
    - $row[credential_name]"; - } + if (mysqli_num_rows($sql_assets) > 0 || mysqli_num_rows($sql_credentials) > 0) { + echo "
    Credentials
      "; + // Credentials linked to assets + mysqli_data_seek($sql_assets, 0); + while ($row = mysqli_fetch_array($sql_assets)) { + $credential_name = nullable_htmlentities($row['credential_name']); + if (!empty($credential_name)) { + echo "
    • $credential_name
    • "; } - - // Showing explicitly linked credentials - while ($row = mysqli_fetch_array($sql_credentials)) { - if (!empty($row['credential_name'])) { - echo "
    • $row[credential_name]
    • "; - } + } + // Explicitly linked credentials + mysqli_data_seek($sql_credentials, 0); + while ($row = mysqli_fetch_array($sql_credentials)) { + $credential_name = nullable_htmlentities($row['credential_name']); + if (!empty($credential_name)) { + echo "
    • $credential_name
    • "; } - ?> -
    - "; } ?> -
    URLs
    -
      - $row[credential_uri]"; - } - } - - // Reset the $sql_assets pointer to the start - mysqli_data_seek($sql_assets, 0); - - // Show URLs linked to assets, that also have credentials - while ($row = mysqli_fetch_array($sql_assets)) { - if (!empty($row['credential_uri'])) { - echo "
    • $row[credential_uri]
    • "; - } - } - ?> -
    - URLs
      "; + foreach ($urls as $url) { + $label = htmlspecialchars(parse_url($url, PHP_URL_HOST) ?: $url); + echo "
    • $label
    • "; + } + echo "
    "; } ?> 0) { ?> -
    Documents
    - - 0) { + echo "
    Documents
      "; + mysqli_data_seek($sql_docs, 0); + while ($row = mysqli_fetch_array($sql_docs)) { + $document_id = intval($row['document_id']); + $document_name = nullable_htmlentities($row['document_name']); + echo "
    • $document_name
    • "; + } + echo "
    "; } ?> - - - - -
@@ -416,3 +311,4 @@ ob_start(); diff --git a/ajax/ajax_service_edit.php b/ajax/ajax_service_edit.php index e0932ba1..2045a693 100644 --- a/ajax/ajax_service_edit.php +++ b/ajax/ajax_service_edit.php @@ -211,7 +211,7 @@ ob_start(); '$service_created_at' OR vendor_archived_at IS NULL) AND vendor_template = 0 AND vendor_client_id = $client_id"); + $sql_all = mysqli_query($mysqli, "SELECT * FROM vendors WHERE (vendor_archived_at > '$service_created_at' OR vendor_archived_at IS NULL) AND vendor_client_id = $client_id"); while ($row_all = mysqli_fetch_array($sql_all)) { $vendor_id = intval($row_all['vendor_id']); $vendor_name = nullable_htmlentities($row_all['vendor_name']); diff --git a/ajax/ajax_software_template_edit.php b/ajax/ajax_software_template_edit.php index ee1b5d98..34de0b57 100644 --- a/ajax/ajax_software_template_edit.php +++ b/ajax/ajax_software_template_edit.php @@ -2,16 +2,16 @@ require_once '../includes/ajax_header.php'; -$software_id = intval($_GET['id']); +$software_template_id = intval($_GET['id']); -$sql = mysqli_query($mysqli, "SELECT * FROM software WHERE software_id = $software_id LIMIT 1"); +$sql = mysqli_query($mysqli, "SELECT * FROM software_templates WHERE software_template_id = $software_template_id LIMIT 1"); $row = mysqli_fetch_array($sql); -$software_name = nullable_htmlentities($row['software_name']); -$software_version = nullable_htmlentities($row['software_version']); -$software_description = nullable_htmlentities($row['software_description']); -$software_type = nullable_htmlentities($row['software_type']); -$software_license_type = nullable_htmlentities($row['software_license_type']); -$software_notes = nullable_htmlentities($row['software_notes']); +$software_name = nullable_htmlentities($row['software_template_name']); +$software_version = nullable_htmlentities($row['software_template_version']); +$software_description = nullable_htmlentities($row['software_template_description']); +$software_type = nullable_htmlentities($row['software_template_type']); +$software_license_type = nullable_htmlentities($row['software_template_license_type']); +$software_notes = nullable_htmlentities($row['software_template_notes']); // Generate the HTML form content using output buffering. ob_start(); @@ -24,7 +24,7 @@ ob_start();
- + + +
+
+ +
+
+ +
+ +
+
+
+ + = 2) { ?>
@@ -283,7 +328,7 @@ ob_start(); - None - + $vendor_template_id_select = $row['vendor_template_id']; + $vendor_template_name_select = nullable_htmlentities($row['vendor_template_name']); ?> diff --git a/ajax/ajax_vendor_template_edit.php b/ajax/ajax_vendor_template_edit.php index f31897b1..23865fcd 100644 --- a/ajax/ajax_vendor_template_edit.php +++ b/ajax/ajax_vendor_template_edit.php @@ -2,23 +2,22 @@ require_once '../includes/ajax_header.php'; -$vendor_id = intval($_GET['id']); +$vendor_template_id = intval($_GET['id']); -$sql = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_id = $vendor_id LIMIT 1"); +$sql = mysqli_query($mysqli, "SELECT * FROM vendor_templates WHERE vendor_template_id = $vendor_template_id LIMIT 1"); $row = mysqli_fetch_array($sql); -$vendor_name = nullable_htmlentities($row['vendor_name']); -$vendor_description = nullable_htmlentities($row['vendor_description']); -$vendor_account_number = nullable_htmlentities($row['vendor_account_number']); -$vendor_contact_name = nullable_htmlentities($row['vendor_contact_name']); -$vendor_phone = formatPhoneNumber($row['vendor_phone']); -$vendor_extension = nullable_htmlentities($row['vendor_extension']); -$vendor_email = nullable_htmlentities($row['vendor_email']); -$vendor_website = nullable_htmlentities($row['vendor_website']); -$vendor_hours = nullable_htmlentities($row['vendor_hours']); -$vendor_sla = nullable_htmlentities($row['vendor_sla']); -$vendor_code = nullable_htmlentities($row['vendor_code']); -$vendor_notes = nullable_htmlentities($row['vendor_notes']); -$vendor_template = intval($row['vendor_template']); +$vendor_name = nullable_htmlentities($row['vendor_template_name']); +$vendor_description = nullable_htmlentities($row['vendor_template_description']); +$vendor_account_number = nullable_htmlentities($row['vendor_template_account_number']); +$vendor_contact_name = nullable_htmlentities($row['vendor_template_contact_name']); +$vendor_phone = formatPhoneNumber($row['vendor_template_phone']); +$vendor_extension = nullable_htmlentities($row['vendor_template_extension']); +$vendor_email = nullable_htmlentities($row['vendor_template_email']); +$vendor_website = nullable_htmlentities($row['vendor_template_website']); +$vendor_hours = nullable_htmlentities($row['vendor_template_hours']); +$vendor_sla = nullable_htmlentities($row['vendor_template_sla']); +$vendor_code = nullable_htmlentities($row['vendor_template_code']); +$vendor_notes = nullable_htmlentities($row['vendor_template_notes']); // Generate the HTML form content using output buffering. ob_start(); @@ -31,18 +30,18 @@ ob_start();
- +