当前位置: 首页>>代码示例>>PHP>>正文


PHP CCrmDeal::GetStageSort方法代码示例

本文整理汇总了PHP中CCrmDeal::GetStageSort方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmDeal::GetStageSort方法的具体用法?PHP CCrmDeal::GetStageSort怎么用?PHP CCrmDeal::GetStageSort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCrmDeal的用法示例。


在下文中一共展示了CCrmDeal::GetStageSort方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

<ul class="crm_dealings_list"><?php 
foreach ($arResult['ITEMS'] as &$item) {
    $dispatcherDataItem = array('ID' => $item['~ID'], 'TITLE' => $item['~TITLE'], 'STAGE_ID' => $item['~STAGE_ID'], 'PROBABILITY' => $item['~PROBABILITY'], 'OPPORTUNITY' => $item['~OPPORTUNITY'], 'FORMATTED_OPPORTUNITY' => $item['FORMATTED_OPPORTUNITY'], 'CURRENCY_ID' => $item['~CURRENCY_ID'], 'ASSIGNED_BY_ID' => $item['~ASSIGNED_BY_ID'], 'ASSIGNED_BY_FORMATTED_NAME' => $item['~ASSIGNED_BY_FORMATTED_NAME'], 'CONTACT_ID' => $item['~CONTACT_ID'], 'CONTACT_FORMATTED_NAME' => $item['~CONTACT_FORMATTED_NAME'], 'COMPANY_ID' => $item['~COMPANY_ID'], 'COMPANY_TITLE' => $item['~COMPANY_TITLE'], 'COMMENTS' => $item['COMMENTS'], 'DATE_CREATE' => $item['~DATE_CREATE'], 'DATE_MODIFY' => $item['~DATE_MODIFY'], 'SHOW_URL' => $item['SHOW_URL'], 'CONTACT_SHOW_URL' => $item['CONTACT_SHOW_URL'], 'COMPANY_SHOW_URL' => $item['COMPANY_SHOW_URL'], 'ASSIGNED_BY_SHOW_URL' => $item['ASSIGNED_BY_SHOW_URL']);
    $clientTitle = '';
    if ($item['~CONTACT_ID'] > 0) {
        $clientTitle = $item['CONTACT_FORMATTED_NAME'];
    }
    if ($item['~COMPANY_ID'] > 0 && $item['COMPANY_TITLE'] !== '') {
        if ($clientTitle !== '') {
            $clientTitle .= ', ';
        }
        $clientTitle .= $item['COMPANY_TITLE'];
    }
    $dispatcherDataItem['CLIENT_TITLE'] = $clientTitle;
    $stageID = $item['~STAGE_ID'];
    $stageSort = CCrmDeal::GetStageSort($stageID);
    $finalStageSort = CCrmDeal::GetFinalStageSort();
    $dispatcherDataItem['IS_FINISHED'] = $stageSort >= $finalStageSort;
    $dispatcherDataItem['IS_SUCCESSED'] = $stageSort === $finalStageSort;
    //$stageClassName = $dispatcherDataItem['IS_FINISHED']
    //	? ($dispatcherDataItem['IS_SUCCESSED'] ? 'green' : 'red') : 'blue';
    $dispatcherData[] =& $dispatcherDataItem;
    unset($dispatcherDataItem);
    ?>
<li class="crm_dealings_list_item<?php 
    echo $isInSelectorMode ? ' crm_arrow' : '';
    ?>
">
		<input type="hidden" class="crm_entity_info" value="<?php 
    echo $item['ID'];
    ?>
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例2: PrepareDealData

 public static function PrepareDealData(&$fields)
 {
     $clientImageID = 0;
     $clientTitle = '';
     //$clientLegend = '';
     if ($fields['~CONTACT_ID'] > 0) {
         $clientImageID = $fields['~CONTACT_PHOTO'];
         $clientTitle = $fields['~CONTACT_FORMATTED_NAME'];
         //$clientLegend = $fields['~CONTACT_POST'];
     }
     if ($fields['~COMPANY_ID'] > 0) {
         if ($clientImageID === 0) {
             $clientImageID = $fields['~COMPANY_LOGO'];
         }
         if ($clientTitle !== '') {
             $clientTitle .= ', ';
         }
         $clientTitle .= $fields['~COMPANY_TITLE'];
     }
     $stageID = $fields['~STAGE_ID'];
     $stageSort = CCrmDeal::GetStageSort($stageID);
     $finalStageSort = CCrmDeal::GetFinalStageSort();
     return array('ID' => $fields['~ID'], 'TITLE' => $fields['~TITLE'], 'STAGE_ID' => $fields['~STAGE_ID'], 'STAGE_NAME' => $fields['~STAGE_NAME'], 'TYPE_ID' => $fields['~TYPE_ID'], 'TYPE_NAME' => $fields['~TYPE_NAME'], 'PROBABILITY' => $fields['~PROBABILITY'], 'OPPORTUNITY' => $fields['~OPPORTUNITY'], 'FORMATTED_OPPORTUNITY' => $fields['FORMATTED_OPPORTUNITY'], 'CURRENCY_ID' => $fields['~CURRENCY_ID'], 'ASSIGNED_BY_ID' => $fields['~ASSIGNED_BY_ID'], 'ASSIGNED_BY_FORMATTED_NAME' => $fields['~ASSIGNED_BY_FORMATTED_NAME'], 'CONTACT_ID' => $fields['~CONTACT_ID'], 'CONTACT_FORMATTED_NAME' => $fields['~CONTACT_FORMATTED_NAME'], 'COMPANY_ID' => $fields['~COMPANY_ID'], 'COMPANY_TITLE' => $fields['~COMPANY_TITLE'], 'COMMENTS' => $fields['~COMMENTS'], 'DATE_CREATE' => $fields['~DATE_CREATE'], 'DATE_MODIFY' => $fields['~DATE_MODIFY'], 'SHOW_URL' => $fields['SHOW_URL'], 'CONTACT_SHOW_URL' => $fields['CONTACT_SHOW_URL'], 'COMPANY_SHOW_URL' => $fields['COMPANY_SHOW_URL'], 'ASSIGNED_BY_SHOW_URL' => $fields['ASSIGNED_BY_SHOW_URL'], 'CLIENT_TITLE' => $clientTitle, 'CLIENT_IMAGE_ID' => $clientImageID, 'IS_FINISHED' => $stageSort >= $finalStageSort, 'IS_SUCCESSED' => $stageSort === $finalStageSort);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:24,代码来源:mobile_helper.php


注:本文中的CCrmDeal::GetStageSort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。