...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_status_invoice.php
- Класс: \allow
- Вызов: allow::getStatusIds
static function getStatusIds($statusType) { $result = array(); if (!in_array($statusType, array('success', 'failed', 'neutral'), true)) return $result; $statuses = self::getStatusList('INVOICE_STATUS'); if ($statusType === 'success') { $result[] = 'P'; } else if ($statusType === 'failed') { $check = false; foreach($statuses as $statusId => $statusInfo) { if ($check) $result[] = $statusId; if ($statusId === 'P') $check = true; } unset($check); } else if ($statusType === 'neutral') { foreach($statuses as $statusId => $statusInfo) { if ($statusId === 'P') break; $result[] = $statusId; } } return $result; }