765
if (Customer::hasCustomerIntegration($prj_id)) {
766
if (empty($support_levels)) {
767
$support_levels = Customer::getSupportLevelAssocList($prj_id);
769
$customer_id = Issue::getCustomerID($issue_id);
770
$contract_id = Issue::getContractID($issue_id);
771
if (!empty($customer_id)) {
772
$customer_details = Customer::getDetails($prj_id, $customer_id, false, $contract_id);
773
$new_headers['X-Eventum-Customer'] = $customer_details['customer_name'];
775
if (count($support_levels) > 0) {
776
$new_headers['X-Eventum-Level'] = @$support_levels[Customer::getSupportLevelID($prj_id, $customer_id, $contract_id)];
765
if (CRM::hasCustomerIntegration($prj_id)) {
766
$crm = CRM::getInstance($prj_id);
768
$customer = $crm->getCustomer(Issue::getCustomerID($issue_id));
769
$new_headers['X-Eventum-Customer'] = $customer->getName();
770
} catch (CustomerNotFoundException $e) { }
772
$contract = $crm->getContract(Issue::getContractID($issue_id));
773
$new_headers['X-Eventum-Level'] = $contract->getSupportLevel()->getName();
774
} catch (ContractNotFoundException $e) {}
780
777
// add assignee header