• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/onec/documentbase.php
  • Класс: BitrixSaleExchangeOneCDocumentBase
  • Вызов: DocumentBase::resolveDocumentTypeId
static function resolveDocumentTypeId($operation)
{
	$typeId = DocumentType::UNDEFINED;

	$message = self::getMessage();

	if(!empty($operation))
	{
		if($operation == $message["CC_BSC1_ORDER"])
		{
			$typeId = DocumentType::ORDER;
		}
		elseif($operation == $message["CC_BSC1_PAYMENT_C"])
		{
			$typeId = DocumentType::PAYMENT_CASH;
		}
		elseif($operation == $message["CC_BSC1_PAYMENT_B"])
		{
			$typeId = DocumentType::PAYMENT_CASH_LESS;
		}
		elseif($operation == $message["CC_BSC1_PAYMENT_A"])
		{
			$typeId = DocumentType::PAYMENT_CARD_TRANSACTION;
		}
		elseif($operation == $message["CC_BSC1_SHIPMENT"])
		{
			$typeId = DocumentType::SHIPMENT;
		}
		else
			$typeId = DocumentType::UNDEFINED;
	}

	return $typeId;
}