'license templates', 'title' => 'That license template is gone', 'text' => 'It may have been deleted.', 'icon' => 'fa-cube', 'filtered' => false, 'actions' => [['label' => 'License Templates', 'href' => 'software_templates.php']]]); require_once "../includes/footer.php"; exit(); } $software_template_id = intval($template['software_template_id']); $name = escapeHtml($template['software_template_name']); // Tab title - used raw, the footer encodes it $page_title = $template['software_template_name']; $archived = !empty($template['software_template_archived_at']); $usage = softwareTemplateUsage([$software_template_id])[$software_template_id] ?? ['count' => 0, 'clients' => 0, 'seats' => 0, 'used' => 0, 'renewing' => 0, 'expired' => 0, 'last' => null]; $type_style = softwareTypeStyle($template['software_template_type']); $csrf = $_SESSION['csrf_token']; // Its licenses by client, with how each is billed when it is sold as a product - in the view picked $product_id = intval($template['software_template_product_id']); $has_product = $template['product_name'] !== null; $all_licenses = softwareTemplateLicenses($software_template_id, $product_id); $views = softwareTemplateLicenseViews($has_product); $view = isset($views[(string) ($_GET['view'] ?? '')]) ? (string) $_GET['view'] : ''; $view_counts = []; foreach ($views as $key => $definition) { $view_counts[$key] = count(array_filter($all_licenses, $definition['test'])); } $licenses = array_filter($all_licenses, $views[$view]['test']); $view_url = function ($key) use ($software_template_id) { return '?' . http_build_query(array_filter(['software_template_id' => $software_template_id, 'view' => $key])) . '#softwareTemplateLicenses'; }; // Who should have one - not counted while it is archived $required = intval($template['software_template_required']); $required_tags = softwareTemplateRequiredTags([$software_template_id])[$software_template_id]; $scope_text = softwareTemplateScopeText($required, $required_tags); $coverage = $required && !$archived ? softwareTemplateCoverage($software_template_id, $required, array_keys($required_tags)) : null; $list_limit = 8; $missing_text = $coverage && $coverage['missing'] ? (count($coverage['missing']) === 1 ? 'the client missing one' : 'the ' . count($coverage['missing']) . ' clients missing one') : ''; $edit_url = "modals/software_template/software_template_edit.php?id=$software_template_id"; $use_url = "modals/software_template/software_template_use.php?id=$software_template_id"; $several_url = "modals/software_template/software_template_use_several.php?id=$software_template_id"; $required_url = "modals/software_template/software_template_required.php?id=$software_template_id"; $true_up_url = "modals/software_template/software_template_true_up.php?id=$software_template_id"; $bill_url = "modals/software_template/software_template_bill.php?id=$software_template_id"; $renew_url = '/agent/modals/software/software_renew.php'; // What can be done to the whole of a view at once $view_ids = function () use ($licenses) { return implode('&', array_map(function ($id) { return 'software_ids[]=' . $id; }, array_keys($licenses))); }; $view_action = [ 'over' => ['label' => 'True up these', 'icon' => 'fa-balance-scale', 'url' => $true_up_url], 'spare' => ['label' => 'True up these', 'icon' => 'fa-balance-scale', 'url' => $true_up_url], 'renewing' => ['label' => 'Renew these', 'icon' => 'fa-redo-alt', 'url' => $renew_url], 'expired' => ['label' => 'Renew these', 'icon' => 'fa-redo-alt', 'url' => $renew_url], 'unbilled' => ['label' => 'Bill these', 'icon' => 'fa-file-invoice-dollar', 'url' => $bill_url], ][$view] ?? null; $term = (string) $template['software_template_term']; $vendor_name = (string) $template['vendor_template_name']; $product_name = (string) $template['product_name']; $facts = array_filter([ 'Type' => $template['software_template_type'] !== '' ? '' . escapeHtml($template['software_template_type']) : '', 'License type' => (string) $template['software_template_license_type'] !== '' ? '' . escapeHtml($template['software_template_license_type']) : '', 'Version' => escapeHtml((string) $template['software_template_version']), 'Seats' => $template['software_template_seats'] !== null ? '' . intval($template['software_template_seats']) : '', 'Renews every' => isset(SOFTWARE_RENEWAL_TERMS[$term]) ? '' . escapeHtml(SOFTWARE_RENEWAL_TERMS[$term]) . ' - from when it was bought' : '', 'Vendor' => $vendor_name !== '' ? '' . vendorTile($vendor_name, 'xs') . escapeHtml($vendor_name) . '' . ($template['vendor_template_archived_at'] ? ' - its vendor template is archived, so licenses from it get no vendor' : '') : '', 'Sold as' => $product_name !== '' ? '' . escapeHtml($product_name) . ' ' . escapeHtml(softwareTemplatePriceText($template)) . '' . ($template['product_archived_at'] ? ' - archived' : '') : '', ]); ?>

Archived - not offered for new licenses

What a license starts with

Name
$value) { ?>
Notes
None - what every license from it should say: where to download it, how it is installed, who to call.

Clients with it

.
$row) { $client_id = intval($row['software_client_id']); $billing = $row['billing']; ?>
ClientSeatsRenews Billed
-' ?> Paused
Not its seats
Not billed
None of them - see them all.
No licenses made from it yet. Agents start one from New License on a client's Licenses.

Used

license made from it 1 ? ', for ' . $usage['clients'] . ' clients' : '' ?> - last
  • ' . $usage['used'] . ' of ' . $usage['seats'] . ' seats in use' : '' . $usage['used'] . ' seats in use' ?>
  • renewing in the next 30 days
  • past their renewal date
No licenses made from it yet - counting started with this version of ITFlow, with the licenses already called what it is called.

Who should have it

No one in particular. Set it up to see which clients are missing it - every client, or the ones with a tag.
- not counted while it is archived.
of have it
Missing it
$client_name) { ?>
$list_limit) { ?>
and more
Every one of them has it.
.

Details

Made
' . escapeHtml($template['created_by_name']) . '
' : '' ?>
Last changed
' . escapeHtml($template['updated_by_name']) . '
' : '' ?>