'vendor templates', 'title' => 'That vendor template is gone', 'text' => 'It may have been deleted.', 'icon' => 'fa-building', 'filtered' => false, 'actions' => [['label' => 'Vendor Templates', 'href' => 'vendor_templates.php']]]); require_once "../includes/footer.php"; exit(); } $vendor_template_id = intval($template['vendor_template_id']); $name = escapeHtml($template['vendor_template_name']); // Tab title - used raw, the footer encodes it $page_title = $template['vendor_template_name']; $archived = !empty($template['vendor_template_archived_at']); $usage = vendorTemplateUsage([$vendor_template_id])[$vendor_template_id] ?? ['clients' => 0, 'vendors' => 0, 'ours' => 0, 'last' => null]; $csrf = $_SESSION['csrf_token']; // Its vendors - the current ones for current clients listed, the rest counted $all_vendors = vendorTemplateVendors($vendor_template_id); $vendors = array_filter($all_vendors, function ($vendor) { return !$vendor['archived'] && !$vendor['client_archived']; }); $set_up = count(array_filter($vendors, function ($vendor) { return $vendor['client_id'] && $vendor['account_number'] !== ''; })); $client_vendors = count(array_filter($vendors, function ($vendor) { return $vendor['client_id'] > 0; })); $others = count($all_vendors) - count($vendors); $license_templates = vendorTemplateLicenseTemplates($vendor_template_id); $edit_url = "modals/vendor_template/vendor_template_edit.php?id=$vendor_template_id"; $clients_url = "/agent/modals/vendor/vendor_template_clients.php?template_id=$vendor_template_id"; // What a vendor from it starts with - the ones it has $t = $template; $website = vendorWebsiteLabel($t['vendor_template_website']); $facts = array_filter([ 'What they are' => escapeHtml((string) $t['vendor_template_description']), 'Support line' => vendorTemplatePhoneHtml($t['vendor_template_phone'], $t['vendor_template_phone_country_code'], $t['vendor_template_extension']), 'Support hours' => escapeHtml((string) $t['vendor_template_hours']), 'SLA' => escapeHtml((string) $t['vendor_template_sla']), 'Support email' => trim((string) $t['vendor_template_email']) !== '' ? '' . escapeHtml($t['vendor_template_email']) . '' : '', 'Support site' => $website !== '' ? '' . escapeHtml($website) . '' : '', 'Account number' => escapeHtml(trim((string) $t['vendor_template_account_number'])), 'PIN' => vendorSecretHtml($t['vendor_template_code']), 'Account manager' => escapeHtml(trim((string) $t['vendor_template_contact_name'])), ], function ($value) { return trim($value) !== ''; }); $icons = []; foreach (vendorTemplateFieldLabels() as $field) { $icons[$field['label']] = $field['icon']; } ?>

Archived - not offered for new vendors

What a vendor starts with

Name
$value) { ?>
Notes
None - what every client's vendor should say: the escalation path, what they ask for before they help, how to open a case online.
No way to reach their support yet - give it their support line, email or site, so every client's vendor has it.

Clients with it

$vendor) { $client_id = $vendor['client_id']; $vendor_url = '/agent/vendor.php?' . ($client_id ? "client_id=$client_id&" : '') . "vendor_id=$vendor_id"; ?>
ClientTheir vendorAccountAdded
Ours No account number -
No client has a vendor made from it yet. Agents add one from New Vendor on a client's Vendors.

Used

client a vendor from it - last added
No vendors made from it yet.

License templates

$license_template) { ?> Archived

Details

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