- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/cashboxorangedata.php
- Класс: BitrixSaleCashboxCashboxOrangeData
- Вызов: CashboxOrangeData::buildCheckQueryByCheckData
protected function buildCheckQueryByCheckData(array $checkData, bool $isSellReturn): array
{
$calculatedSignMap = $this->getCalculatedSignMap();
$result = [
'id' => static::buildUuid(static::UUID_TYPE_CHECK, $checkData['unique_id']),
'inn' => $this->getValueFromSettings('SERVICE', 'INN'),
'group' => $this->getField('NUMBER_KKM') ?: null,
'key' => $this->getValueFromSettings('SECURITY', 'KEY_SIGN') ?: null,
'content' => [
'type' => $calculatedSignMap[$checkData['calculated_sign']],
'positions' => [],
'checkClose' => [
'payments' => [],
'taxationSystem' => $this->getValueFromSettings('TAX', 'SNO'),
],
'customerContact' => $this->getCustomerContact($checkData),
],
'meta' => self::PARTNER_CODE_BITRIX
];
foreach ($checkData['items'] as $item)
{
$result['content']['positions'][] = $this->buildPosition($checkData, $item, $isSellReturn);
}
$paymentTypeMap = $this->getPaymentTypeMap();
foreach ($checkData['payments'] as $payment)
{
$result['content']['checkClose']['payments'][] = [
'type' => $paymentTypeMap[$payment['type']],
'amount' => $payment['sum'],
];
}
return $result;
}