From 382258a27c8a8efbc8424b5aa99b02cfcd0e1b44 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 26 Mar 2025 18:17:45 -0400 Subject: [PATCH] Add User and Asset Assigned Licenses to Client PDF Export --- CHANGELOG.md | 1 + post/user/client.php | 123 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21ade3ba..45f7de92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ This file documents all notable changes made to ITFlow. - Added Projects to the client side navigation. - Added Create New Ticket while in project details section. - Brought back Batch Payment in client invoices. +- Added client abbrevation to client and global search options. ### Breaking Changes diff --git a/post/user/client.php b/post/user/client.php index 19c22ff5..4672ef5d 100644 --- a/post/user/client.php +++ b/post/user/client.php @@ -667,6 +667,34 @@ if (isset($_POST['export_client_pdf'])) { $sql_certficates = mysqli_query($mysqli,"SELECT * FROM certificates WHERE certificate_client_id = $client_id AND certificate_archived_at IS NULL ORDER BY certificate_name ASC"); $sql_software = mysqli_query($mysqli,"SELECT * FROM software WHERE software_client_id = $client_id AND software_archived_at IS NULL ORDER BY software_name ASC"); + $sql_user_licenses = mysqli_query($mysqli," + SELECT + contact_name, + software_name + FROM + software_contacts + JOIN + contacts ON software_contacts.contact_id = contacts.contact_id + JOIN + software ON software_contacts.software_id = software.software_id + ORDER BY + contact_name, software_name;" + ); + + $sql_asset_licenses = mysqli_query($mysqli," + SELECT + asset_name, + software_name + FROM + software_assets + JOIN + assets ON software_assets.asset_id = assets.asset_id + JOIN + software ON software_assets.software_id = software.software_id + ORDER BY + asset_name, software_name;" + ); + ?> @@ -1684,6 +1712,101 @@ if (isset($_POST['export_client_pdf'])) { //Software END + //Software User License + 0 && $export_software == 1){ ?> + { + text: 'User Assigned Licenses', + style: 'title' + }, + + { + table: { + body: [ + [ + { + text: 'User', + style: 'itemHeader' + }, + { + text: 'Software', + style: 'itemHeader' + } + ], + + + + [ + { + text: , + style: 'item' + }, + { + text: , + style: 'item' + } + ], + + + ] + } + }, + + //Software END + + //Software Asset License + 0 && $export_software == 1){ ?> + { + text: 'Asset Assigned Licenses', + style: 'title' + }, + + { + table: { + body: [ + [ + { + text: 'Asset', + style: 'itemHeader' + }, + { + text: 'Software', + style: 'itemHeader' + } + ], + + + + [ + { + text: , + style: 'item' + }, + { + text: , + style: 'item' + } + ], + + + ] + } + }, + + //Software END + + //Networks Start 0 && $export_networks == 1){ ?> {