CCrmViewHelper::RenderInvoiceStatusSettings

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. RenderInvoiceStatusSettings
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::RenderInvoiceStatusSettings
static function RenderInvoiceStatusSettings()
{
	$result = array();
	$isTresholdPassed = false;
	foreach(self::PrepareInvoiceStatuses() as $status)
	{
		$info = array(
			'id' => $status['STATUS_ID'],
			'name' => $status['NAME'],
			'sort' => intval($status['SORT']),
			'color' => isset($status['COLOR']) ? $status['COLOR'] : ''
		);

		if($status['STATUS_ID'] === 'P')
		{
			$isTresholdPassed = true;
			$info['semantics'] = 'success';
			$info['hint'] = GetMessage('CRM_INVOICE_STATUS_MANAGER_F_STEP_HINT');
			$info['hasParams'] = true;
		}
		elseif($status['STATUS_ID'] === 'D')
		{
			$info['semantics'] = 'failure';
		}
		elseif(!$isTresholdPassed)
		{
			$info['semantics'] = 'process';
		}
		else
		{
			$info['semantics'] = 'apology';
		}
		$result[] = $info;
	}

	$settings = array(
		'imagePath' => '/bitrix/js/crm/images/',
		'serverTime' => time() + CTimeZone::GetOffset()
	);

	$messages = array(
		'dialogTitle' => GetMessage('CRM_INVOICE_STATUS_MANAGER_DLG_TTL'),
		'failureTitle' => GetMessage('CRM_INVOICE_STATUS_MANAGER_FAILURE_TTL'),
		'selectorTitle' => GetMessage('CRM_INVOICE_STATUS_MANAGER_SELECTOR_TTL'),
		'setDate' =>  GetMessage('CRM_INVOICE_STATUS_MANAGER_SET_DATE'),
		'dateLabelText' => GetMessage('CRM_INVOICE_STATUS_MANAGER_DATE_LABEL'),
		'payVoucherNumLabelText' => GetMessage('CRM_INVOICE_STATUS_MANAGER_PAY_VOUCHER_NUM_LABEL_1'),
		'commentLabelText' => GetMessage('CRM_INVOICE_STATUS_MANAGER_COMMENT_LABEL'),
		'notSpecified' => GetMessage('CRM_INVOICE_STATUS_MANAGER_NOT_SPECIFIED')
	);

	return '';
}

Добавить комментарий