This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\CModule::IncludeModule("crm"); | |
$resultClient = \CCrmCompany::GetList(array(),array("UF_CRM_1493986539" => 15012)); | |
$client = $resultClient->fetch(); | |
return $client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\CModule::IncludeModule("crm"); | |
$resultClient = \CCrmCompany::GetList(array(),array("ID" => 12, "CHECK_PERMISIONS"=>"N")); | |
$client = $resultClient->fetch(); | |
$result = $client["UF_CRM_1493986588"]; | |
echo $result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$BxDate = date("m/d/Y", strtotime($fecha)); //Bitrix Date | |
$BxDate = date("m-d-Y h:i:s", strtotime($fecha)); //Bitrix DateTime | |
$BxDate = date("m-d-Y", strtotime($fecha)); //SQL Date | |
$BxDate = date("Ymdhis", strtotime("now")); //Current day for random Date | |
/* Date inside Business Process */ | |
//{=System:Now} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Consultar el ultimo dia de ejecucion | |
\CModule::IncludeModule("codisoti.serverbots"); | |
use Codisoti\ServerBots\Utils; | |
$obj = new Utils(); | |
$result = $obj->getLastExecutionByPortalDetail(885,32); | |
//---------------------------------------------------------------------------------------------------- | |
//actualizar la ultima execution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CModule::IncludeModule("iblock"); | |
$ob=CIblockElement::GetList( | |
array(), | |
array("IBLOCK_ID"=>62, "PROPERTY_PORTAL" =>885), | |
false, | |
false, | |
array("ID","PROPERTY_LAST_EXECUTION")); | |
while ($res = $ob->GetNextElement()) { | |
$arFields = $res->GetFields(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assignLastExecutionByClient($portal_id,$arClientId,$arCheckDate){ | |
if(isset($arClientId) && count($arClientId)>0){ | |
foreach ($arClientId as $key => $value) { | |
$ElementPortalDetail = $utils->getLastExecutionByPortalDetail($portal_id,$value); | |
$elementId = $ElementPortalDetail["id"]; | |
$checkDate = (max($arCheckDate[$value])); | |
$lastExecutionBot = date("m/d/Y",strtotime($checkDate["checkDate"])); | |
$lastExecutionPortal = date("m/d/Y",strtotime($ElementPortalDetail['last_execution'])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Seding data through sync-request | |
// ======================================================================== | |
let sendServer = request('POST', key.serverUrl, | |
{ | |
headers: {'content-type': 'application/x-www-form-urlencoded'}, | |
body : 'username=' + key.username + '&password=' + key.password + '&botName=cigna&request=save&data='+objsToServer | |
}); | |
let responseBody = sendServer.getBody(); | |
console.log(responseBody.toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Date.au3> | |
Func uDateYesterday() | |
$yesterday = _DateAdd("d", -1, _NowCalcDate()) | |
$arDate = StringSplit($yesterday, "/") | |
$sDate_New = $arDate[2] & "/" & $arDate[3] & "/" & $arDate[1] | |
;~ $sDate_New = $aDate[3] & " " & $aDate[2] & " " & StringRight($aDate[1],2) | |
;~ MsgBox(0, "Date", "Yesterday is "& $sDate_New) | |
Return $sDate_New | |
EndFunc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Func findWndTitle($sTitle) | |
Sleep(2000) | |
Local $hTitle ='' | |
Local $w_WinList = WinList() | |
For $i = 1 to $w_WinList[0][0] | |
If $w_WinList[$i][0] <> "" _ | |
AND BitAnd(WinGetState($w_WinList[$i][1]), 2) _ | |
AND StringInStr($w_WinList[$i][0], $sTitle) _ | |
Then | |
$hTitle = $w_WinList[$i][0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Func waitForExistFile($sPath, $iTimeOut) | |
$sBegin = TimerInit() | |
While TimerDiff($sBegin) < $iTimeOut | |
If FileExists($sPath) then | |
Return True | |
Else | |
ContinueLoop | |
EndIf | |
Return false | |
WEnd |
OlderNewer