LOCAL cNfrPayrollExpDate=JUL(2023, 12, 31) These next two values need to be changed for each version accordingly. |
LOCAL cAuthorizedVersion=6.0 |
LOCAL cGracePeriod |
LOCAL cUserKeyLen |
LOCAL cActualUserKey |
LOCAL cDemoSystem$="31353033393633" |
LOCAL cSubscriptionModules$=", P/R, " |
LOCAL cTaskKeysToExclude$=SEP+"010000047"+SEP+"010000089"+SEP+"010000035"+SEP Delimited list of task keys which are excluded from the subscription expiration check. "010000047" SY_Launcher_ui "010000089" SY_SagePepLaunch "010000035" SY_Options_ui |
LOCAL adCmdText=1 |
LOCAL adCmdStoredProc=4 |
LOCAL adClipString=2 |
LOCAL adExecuteNoRecords=128 |
LOCAL adVarChar=200 |
LOCAL adInteger=3 |
LOCAL adParamInput=1 |
LOCAL adParamOutput=2 |
LOCAL adParamInputOutput=3 |
LOCAL adParamReturnValue=4 |
LOCAL adTextNoRecords=129 |
LOCAL adOpenForwardOnly=0 |
LOCAL adOpenStatic=3 |
LOCAL adLockReadOnly=1 |
LOCAL adUseServer=2 |
LOCAL adUseClient=3 |
LOCAL cPR0Mask$="|PR0|" Mask used to locate payroll tier flag 0 |
LOCAL cPR1Mask$="|PR1|" Mask used to locate payroll tier flag 1 |
LOCAL cPR2Mask$="|PR2|" Mask used to locate payroll tier flag 2 |
LOCAL cPR3Mask$="|PR3|" Mask used to locate payroll tier flag 3 |
LOCAL cPayrollTierLen=3 Length of payroll tier license code used to parse the cPayrollTierLimits$ table of tier limits. |
LOCAL cPayrollTierLimits$="PR01:10, PR02:25, PR03:50, PR04:75, PR05:100, PR06:150, PR07:-1, PR08:200, PR09:250, PR10:300, PR11:350, PR12:400, PR13:500" Table of tier limits. |
LOCAL cUnlimitedPayrollTier=-1 Indicates the subscription level is unlimited |
LOCAL cDefaultTimeOut=15000 Timout value for the entitlement service request |
LOCAL cHashType Hash type used to hash table data |
PROPERTY ModuleList$ * Read Only * |
PROPERTY ExpDate$ * Read Only * |
PROPERTY RegText$ * Read Only * |
FUNCTION CheckGracePeriod(serviceId$, graceEndDate$) Returns number of days remaining in the grace period for the given service or product id | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION CheckModifiedValue() Validates the expected value matches the current value. | ||||||||
| ||||||||
| ||||||||
FUNCTION CheckSlsClient() Function used to indicate that the SLS Client is available | ||||||||
| ||||||||
FUNCTION CheckSubscriptionPlan() Checks the last successful SLS request date against the subscription plan update schedule. If the last date is on or after the planned next update request then an SLS request is made, and the last date is updated if the request was successful. | ||||||||
| ||||||||
| ||||||||
FUNCTION CheckSubscriptionRequirements(module$) Confirms that requirements specific to a subscription based module are validated and in tact. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION GenerateModifiedValue() Generate the current value and save it for the next check. | ||||||||
| ||||||||
| ||||||||
FUNCTION GetEULADisplayForModule(module$) Get the status for display of the EULA for a module | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION GetExpDate(date$) | ||||||||
FUNCTION GetExpDate(module$, moduleExpDate$) | ||||||||
FUNCTION GetExternalSeatCount() | ||||||||
FUNCTION GetModuleList(list$) | ||||||||
FUNCTION GetModuleNotifications(arg.moduleCode$) Check for module notifications. | ||||||||
| ||||||||
| ||||||||
FUNCTION GetNamedUserCount() | ||||||||
FUNCTION GetNtpDate$(doNotUsePCTimeOnFailure) | ||||||||
FUNCTION GetNtpDate$() Gets the date from the Internet converted to the local timezone. | ||||||||
| ||||||||
| ||||||||
FUNCTION GetNtpJulDate(doNotUsePCTimeOnFailure) | ||||||||
FUNCTION GetNtpJulDate() Gets the date from the Internet and converts it to Julian. | ||||||||
| ||||||||
| ||||||||
FUNCTION GetPayrollTierLimit() Returns the upper limit of employees that can be paid under the current (local) payroll tier license code. | ||||||||
| ||||||||
| ||||||||
FUNCTION GetSubscriptionStatus(module$, skipUpdate, taskKeyCheck$) | ||||||||
FUNCTION GetSubscriptionStatus(module$, skipUpdate) | ||||||||
FUNCTION GetSubscriptionStatus(module$) | ||||||||
FUNCTION GetSubscriptionStatus() Gets the Registration (subscription) status. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION GetSubscriptionValue$(name$) | ||||||||
FUNCTION GetSubscriptionValue(name$) Gets the value for the subscription setting name. | ||||||||
| ||||||||
| ||||||||
FUNCTION GetTotalUsers(crmCount, inMAS, inCRM) | ||||||||
FUNCTION GetUserCount() | ||||||||
FUNCTION InitiateGracePeriod(serviceId$) Initiates the grace period for the given service or product id | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION IsSageInternalInstallation(customerNumber$) | ||||||||
FUNCTION IsSageInternalInstallation() Determines whether the given customer number is for a Sage internal installation or not. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION IsSubscriptionModule(module$) Indicates whether a module is registered on a subscription basis | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION RegisterModules(subscriptionsOnly) | ||||||||
FUNCTION RegisterModules() Register and apply the current product key to the module and subscription records. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION RegisterProvideX() | ||||||||
FUNCTION RegisterProvideX(serialNo$, registrationKey$) | ||||||||
FUNCTION SetSageInternalInstallation(customerNumber$) Function used by install shield to set system parameters, etc according to Sage internal installation specifications. | ||||||||
FUNCTION SlsNotify(code$, details$) Send a license infringement notification to SLS | ||||||||
| ||||||||
| ||||||||
FUNCTION UpdateEULADisplayForModule(module$, bDisplay) Update status for display of EULA for a module | ||||||||
| ||||||||
| ||||||||
FUNCTION UpdateModuleNotification(arg.moduleCode$, arg.status) Update the status of the module notifications. | ||||||||
| ||||||||
| ||||||||
FUNCTION UpdateModuleRecords() | ||||||||
FUNCTION UpdateProductKeyData() Method to clear/reset the subscription list appropriatly when the product key has been manually entered. | ||||||||
FUNCTION UpdateSubscriptionDataForNFR() Logic required when bypassing the SLS update for NFR registered installations. | ||||||||
FUNCTION UpdateSubscriptions(timeOut, updateKeys) | ||||||||
FUNCTION UpdateSubscriptions(timeOut) | ||||||||
FUNCTION UpdateSubscriptions() Initiates a request to the SLS Client to check for updated entitlement data. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION Validate() | ||||||||
FUNCTION Validate(module$) | ||||||||
FUNCTION ValidateMASUsers(CRMuserList$) | ||||||||
FUNCTION ValidateSageCRM(userList$) | ||||||||
FUNCTION LOCAL FormatSLSDate$(name$, date$) Reformats date from the format returned by SLS (YYYY/MM/DD) to YYYYMMDD. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL GetExpirationDateForModule$(module$) Returns the appropriate expiration date for the given module. For perpetual modules that allow a trial period, it returns today's date plus (cGracePeriod), for subscription modules, it returns the date contained in the local subscription/entitlement data (GetSubscriptionList()). | ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL GetModulePropertyValue$(oModule, propertyName$, collectionName$) | ||||||||
FUNCTION LOCAL GetModulePropertyValue$(oModule, propertyName$) Iterates the entitlement'Module'Properties[Constraints] collection for an items name and if found returns the value. | ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL GetPayrollTier$() Returns the current (local) payroll tier license code. | ||||||||
FUNCTION LOCAL GetSecurityChecksum$(data$, base$) Performs security checksum algorith on the data string provided, ensures that it does not contain a SEP, and returns the value. | ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL GetSoftwareInfo(clr) Create, populate and return a Sage100.SLS.Client.Common.SoftwareInfo object | ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL GetSubscriptionList(subscriptionList$, securityOverride) | ||||||||
FUNCTION LOCAL GetSubscriptionList(subscriptionList$) Gets/validates current SubscriptionList value | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL GetTableValue$(table$) Function used by Generate & Check Modified Value to read a tables data and return the checksum. | ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL RemoveSubscriptionSetting(setting$) Removes the setting (name & value) from the subscription list. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL SetLocalRegistrationVars() Sets/resets the local registration values with the current values from SY_System | ||||||||
FUNCTION LOCAL PERFORM SetModuleDefaults() Subroutine used to set the module record defaults | ||||||||
FUNCTION LOCAL SetSubscriptionList(subscriptionList$) Sets/updates the SubscriptionList column with CRC check key | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL ValidateModuleChecksum(module$) Validates the stored SecurityChecksum value against the current checksum. If the checksum is the default value, then the expiration date and new checksum are set for the module. | ||||||||
| ||||||||
| ||||||||
| ||||||||
FUNCTION LOCAL WriteModuleExpDate(module$) |
retFAILURE, retSUCCESS, retNEW, retWARNING, retCANCEL, retYES, retNO, msgYES$, msgNO$, msgCANCEL$, msgOK$, msgRETRY$, msgABORT$, msgIGNORE$, msgNOTONFILE$, msgTIMEOUT$, msgDISABLE, msgACTIVE, msgLinkHELP$, msgLinkMSG$, isFALSE, isTRUE, isYES$, isNO$, isBUSY$, edtNONE, edtEXISTS, edtNEW, ctlDISABLE, ctlENABLE, ctlSHOW, ctlHIDE, ctlLOCK, ctlUNLOCK, ctlLOCKORDISABLE, ctlUNLOCKORENABLE, popHIDE, popDISABLE, popSHOW, popSHOWCHECKED, grdMODEVIEW, grdMODEMAINT, grdMODEADD, filCREATE, filLOCK, filCREATELOCK, filGLOBAL, filCREATEGLOBAL, filLOCKGLOBAL, filCREATELOCKGLOBAL, filCHANNEL, filRAW, filPURGE, filLOAD, filINPUT, filNOOBJECT, filPVX, filREFRESH, filPVX4$, filPVX5$, pthCOMPANY$, pthOTHERCOMPANY$, pthPRCOMPANY$, pthOTHERPRCOMPANY$, pthSYSTEM$, pthUSER$, pthSOA$, pthHOME$, pthROOT$, pthDICTIONARY$, pthTEXTOUT$, pthLOCK$, pthLOCKSYS$, pthPREFIX$, pthARCHIVE$, pthLOGFILES$, folderCOMMONPROGRAMFILES, folderCOMMONAPPLICATIONDATA, errOBJECT, errSYSTEMLOCK, errCONTINUE, errEMBEDDEDIO, errSYSLOCK, extSQLCREATETABLE$, extSQLALLOWNULLDATES$, dbALL$, dbNONE$, dateTOSTRINGFORMAT$, dateLONGMASK$, dateSHORTFMT, dateLONGFMT, dateYEARFIRST, dateMONTHFIRST, dateDAYFIRST, timeMINUTESMASK$, timeMINUTES24MASK$, timeSECONDSMASK$, timeSECONDS24MASK$, idxPRIMARY$, idxBATCH$, idxDISPLAY$, dirFIRST, dirLAST, dirNEXT, dirPREVIOUS, typALPHANUM, typZEROFILL, typCHARNUM, typMASTERNUM, typALPHANUMNF, typMASTERNUMC, typALPHA$, typNUMBERS$, typALPHANUM$, typALPHANUMNF$, typCHARNUM$, typMASTERNUM$, typMASTERNUMCLEN, modTASKOTFDISALLOW$, logALLACTIVITY$, logACTIVITY$, logERROR$, logACTNEWCUSTOMER$, logACTDATASYNC$, logACTDATAIMPORT$, logACTOPTIONCHANGED$, logACTPROGRAMLAUNCH$, logDFDM$, logSECURITY$, logTASKSCHEDULER$, logWEBERROR$, logVISUALINTEGRATOR$, logEntryIDLength, chkOFF$, chkON$, chkGRAYED$, secVIEWONLY, secCREATEONLY, secMODIFYONLY, secCREATEMODIFY, secDELETEONLY, secCREATEDELETE, secMODIFYDELETE, secFULLACCESS, secDEFAULTUSER$, secDEFAULTROLE$, regHKEY_CLASSES_ROOT, regHKEY_CURRENT_USER, regHKEY_LOCAL_MACHINE, regHKEY_USERS, regHKEY_CURRENT_CONFIG, regODBC_PATH$, regMAS_PATH$, E3_MYHANDLE, E3_TASK, E3_QUIT, E3_COCHANGE, E3_DATECHANGE, E3_USERCHANGE, E3_SRVRPATH, E3_HELPFILE, E3_TECHSUPPORT, E3_QUERYTOQUIT, E3_SUPERVISOR, E3_CUSTOMIZE, E3_SWITCHMODULE, E3_DISABLEWIN, E3_CURSOR, E3_USERID, E3_PRIVATETASK, E3_CHAT, E3_BROADCAST, E3_RELOAD, E3_PASSTHROUGH, E3_EXECUTE, E3_EXPCOCHANGE, E3_EXPTASK, E3_EXPLAUNCH, E3_SILENT, E3_DIRECT, E3_NODELIST, E3_OCXITEM, E3_MODULEID, E3_CUSTFAV, E3_HOMEPAGE, E3_MINIMIZE, E3_UNDOCKED, E3_DOCKED, E3_PUBLICTASK, E3_LAUNCHURL, E3_BTNCHANGE, E3_STDBTNRELOAD, E3_MYBUSINESS, E3_REGLOADED, E3_LOADED, E3_V4TASK, E3_PUBMODIFY, E3_TASKRELOAD, E3_SETAUTOHIDE, E3_COCHANGE2, E3_TASK_NC, E3_V4TASK_NC, E3_TASK_ALTC, E3_V4TASK_ALTC, E3_PASSWORD, E3_LAUNCHVIEW, E3_LAUNCHBIETASK, E3_CLEANUPBIE, E3_STARTVIEW, E3_BIE_ADMIN, E3_HELPPATH, E3_CUSTOMERID, E3_MASVERSION, E3_LAUNCHEMBEDDED, E3_LAUNCHERMENU, E3_APP_POINTSIZE, E3_LAUNCHERVERSION, E3_DISABLE, E3_ENABLE, E3_SHOW, E3_HIDE, E3_REFRESH, E3_LIBMASTER, WM_COPY, wtsINITIALPROGRAM, wtsAPPLICATIONNAME, wtsWORKINGDIRECTORY, wtsOEMID, wtsSESSIONID, wtsUSERNAME, wtsWINSTATIONNAME, wtsDOMAINNAME, wtsCONNECTSTATE, wtsCLIENTBUILDNUMBER, wtsCLIENTNAME, wtsCLIENTDIRECTORY, wtsCLIENTPRODUCTID, wtsCLIENTHARDWAREID, wtsCLIENTADDRESS, wtsCLIENTDISPLAY, wtsCLIENTPROTOCOLTYPE, thmNORMAL, thmMETAL, thmOLIVE, rptREPORTTYPESTD, rptREPORTTYPELABEL, rptREPORTTYPEMULTCOL, rptISTRUE, rptISFALSE, rptISDEFAULT, rptPORTRAIT, rptLANDSCAPE, rptASCENDING, rptDESCENDING, rptRIGHTALIGN, rptLEFTALIGN, rptHORCENTERALIGN, rptLSSINGLELINE, rptSTSUM, rptSTAVERAGE, rptSTCOUNT, rptDFLTHSPACING, rptDFLTVSPACING, rptDFLTFONTSIZE, rptDFLTLEFT, rptDFLTTOP, rptTWIPSPERCHARW, rptTWIPSPERCHARH, rptSVTREPORTTITLE, rptEDTDISKFILE, rptGCANYVALUE, rptGCDAILY, rptCRDATEFIELD, rptCRDATETIMEFIELD, crEFTCrystalReport, crEFTRichText, crEFTWordForWindows, crEFTExcel, crEFTPortableDocFormat, crEFTHTML32, crEFTHTML40, crEFTExcelRecord, crEFTText, crEFTCharacterSeparatedValues, crEFTTabSeparatedText, crEFTEditableRTF, crEFTXml, crEFTRPTR, crEFTExcelWorkbook, cContextKeyLen1, cContextKeyLen2, cContextKeyLen3, adCmdText, adCmdStoredProc, adClipString, adExecuteNoRecords, adVarChar, adInteger, adParamInput, adParamOutput, adParamInputOutput, adParamReturnValue, adTextNoRecords, adOpenForwardOnly, adOpenStatic, adLockReadOnly, adUseServer, adUseClient, dbTMP$, dbTEMPDB$, dbSYSDB$, dbPVXDDF, dbPVXDB, dbMYSQL, dbADO, dbSQL, LastErrorMsg$, LastErrorNum$, SageCloudAppDesc$, IolNomads$ |
cLockInfoNOKEY$ |
AESCipher$, AES256Cipher$ |
GetNOMADSIolist$(), MaskString(), RawString(), ClassValidateEMailAddress(), dateTODAY$(), Element$(), fmtMODCODE$(), fmtMODPREFIX$(), PERFORM FunctionBreak(), GetExceptionMsg$(), GetFileName(), GetJobTitles(), GetPrinterProps(), GetRecordCount(), isALPHA(), isDATE(), isNUMERIC(), MsgPath$(), ParseString(), ParseTagField(), Position(), QUO$(), ValidateFormatType() |
CheckWhoHasLock(), CreateLockInfo(), RemoveLockInfo(), OpenTable(), OpenTempFile() |
ConfirmAESKey(), ConfirmPassword(), EncryptAESData(), EncryptAESKey(), EncryptAESPassword(), EncryptPassword(), GetAESDataTest$(), PasswordAcceptable(), ValidateAESData(), ValidateAESPassword(), ValidatePassword(), VerifyAESDataEncryption(), DecryptAESData(), DecryptAESKey(), DecryptAESPassword(), DecryptAltAESData(), DecryptPassword(), EncryptAltAESData(), GetKEK$(), InitAESKey(), InitializeAES(), InitializeAltAES(), ValidateAltAESData(), VerifyAltAESDataEncryption() |