Skip to content

Instantly share code, notes, and snippets.

@zetrider
Created March 16, 2016 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zetrider/1ca91f2bd726817e3350 to your computer and use it in GitHub Desktop.
Save zetrider/1ca91f2bd726817e3350 to your computer and use it in GitHub Desktop.
AddEventHandler("pr.recrm", "OnBeforeImport", "MyReCRMOnBeforeImport");
function MyReCRMOnBeforeImport($arData = array())
{
$arResult = $arData;
if($arResult['TYPE'] == 'estate')
{
/* Добавим в свойство MyCustomField стоимость price_total + 18% */
$arResult['PROP']['MyCustomField'] = $arResult['PROP']['price_total'] * 1.18;
}
return $arResult;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment