• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/cashboxorangedataffd12.php
  • Класс: BitrixSaleCashboxCashboxOrangeDataFfd12
  • Вызов: CashboxOrangeDataFfd12::buildCorrectionCheckQuery
public function buildCorrectionCheckQuery(CorrectionCheck $check)
{
	$data = $this->getCheckData($check);
	$correctionInfo = $data['correction_info'];

	$result = $this->buildCheckQueryByCheckData($data, ($check->getType() === 'sellreturn'));
	$result['content']['ffdVersion'] = self::FFD_12_VERSION;
	$result['content']['correctionType'] = $this->getCorrectionTypeMap($correctionInfo['type']);
	$result['content']['causeDocumentDate'] = $this->getCorrectionCauseDocumentDate($correctionInfo);
	$result['content']['causeDocumentNumber'] = $this->getCorrectionCauseDocumentNumber($correctionInfo);
	$result['content']['totalSum'] = $this->getCorrectionTotalSum($correctionInfo);

	$vats = $this->getVatsByCheckData($data);
	if (is_array($vats))
	{
		foreach ($vats as $vat)
		{
			$result['content'][$vat['code']] = $vat['value'];
		}
	}

	return $result;
}