...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/sip_helper.php
- Класс: \CCrmSipHelper
- Вызов: CCrmSipHelper::getInvoices
static function getInvoices($entityID, $isAdmin): array { $invoices = []; $dbInvoice = CCrmInvoice::GetList( ['DATE_INSERT' => 'ASC'], [ '=UF_CONTACT_ID' => $entityID, 'PAYED' => 'N', 'CANCELED' => 'N', 'CHECK_PERMISSIONS' => $isAdmin ? 'N' : 'Y' ], false, ['nTopCount' => 2], ['ID', 'ORDER_TOPIC', 'DATE_BILL', 'PRICE', 'CURRENCY', 'STATUS_ID'] ); if(is_object($dbInvoice)) { while($invoiceFields = $dbInvoice->Fetch()) { $invoiceFields['PRICE_FORMATTED'] = CCrmCurrency::MoneyToString($invoiceFields['PRICE'], $invoiceFields['CURRENCY']); $invoiceFields['SHOW_URL'] = CCrmOwnerType::GetEntityShowPath(CCrmOwnerType::Invoice, $invoiceFields['ID']); $invoices[] = $invoiceFields; } } return $invoices; }