• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/ProductGrid/ProductRowViewModel.php
  • Класс: BitrixCrmMobileProductGridProductRowViewModel
  • Вызов: ProductRowViewModel::toArray
public function toArray(): array
{
	$source = $this->source->toArray();
	if (isset($source['DATE_RESERVE_END']))
	{
		if ($source['DATE_RESERVE_END'] instanceof Date)
		{
			$source['DATE_RESERVE_END'] = $source['DATE_RESERVE_END']->getTimestamp() - CTimeZone::GetOffset();
		}
	}

	return array_merge($source, [
		'ID' => $this->getId(),
		'CURRENCY' => $this->currencyId,
		'SKU_TREE' => $this->skuTree,
		'TAX_MODE' => $this->isTaxMode,
		'PRICE_EDITABLE' => $this->isPriceEditable,
		'DISCOUNT_EDITABLE' => $this->isDiscountEditable,
		'SECTIONS' => $this->sections,
		'GALLERY' => $this->gallery,
		'BASKET_ITEM_FIELDS' => $this->basketItemFields,
		'BARCODE' => $this->barcode,
		'TYPE' => $this->type,
		'STORES' => $this->stores,
		'HAS_STORE_ACCESS' => $this->hasStoreAccess,
		'STORE_NAME' => $this->storeName,
		'STORE_AMOUNT' => $this->storeAmount,
		'STORE_AVAILABLE_AMOUNT' => $this->storeAvailableAmount,
		'INPUT_RESERVE_QUANTITY' => $this->inputReserveQuantity,
		'ROW_RESERVED' => $this->rowReserved,
		'DEDUCTED_QUANTITY' => $this->deductedQuantity,
		'SHOULD_SYNC_RESERVE_QUANTITY' => $this->shouldSyncReserveQuantity,
	]);
}