<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=Payroll%3A_Editing_formulas</id>
	<title>Payroll: Editing formulas - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=Payroll%3A_Editing_formulas"/>
	<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Payroll:_Editing_formulas&amp;action=history"/>
	<updated>2026-05-15T15:29:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://in.compucrete.com/index.php?title=Payroll:_Editing_formulas&amp;diff=456&amp;oldid=prev</id>
		<title>WikiAdmin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Payroll:_Editing_formulas&amp;diff=456&amp;oldid=prev"/>
		<updated>2023-07-14T13:00:34Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:00, 14 July 2023&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff::1.12:old-455:rev-456 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiAdmin</name></author>
	</entry>
	<entry>
		<id>http://in.compucrete.com/index.php?title=Payroll:_Editing_formulas&amp;diff=455&amp;oldid=prev</id>
		<title>Intra&gt;Chanson: /* System Variables */</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Payroll:_Editing_formulas&amp;diff=455&amp;oldid=prev"/>
		<updated>2021-04-26T18:35:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;System Variables&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category: Payroll]]&lt;br /&gt;
== Payroll Formulas ==&lt;br /&gt;
&lt;br /&gt;
=== Changing Baseline Formulas ===&lt;br /&gt;
&lt;br /&gt;
* Current Payroll formulas are store in support Drive&lt;br /&gt;
* Custom formulas may be added to the baseline formulas only when preceeded by a '''*'''.&lt;br /&gt;
* Any formula that relies on a specifically-named definition that is NOT a baseline definition should be preceeded with a '''*'''.&lt;br /&gt;
* Baseline definitions should NEVER contain any G/L Accounts or G/L masks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# Prior to making a change, create a subdirectory BKUPmmddyyyy and move all .XML files into the backup area.&lt;br /&gt;
# Create a new company in Keystone that will be used exclusively for Payroll Formula development and testing.&lt;br /&gt;
# Login as Admin and change the System Options to activate Payroll.&lt;br /&gt;
# Backup the database.&lt;br /&gt;
# Login as a user, go to the '''Setup/Utilities''' menu and import the configuration.&lt;br /&gt;
# Go to '''Month-End''' and set up the accounting periods.&lt;br /&gt;
# Go to '''File Maintenance'''.&lt;br /&gt;
## Go to '''Tax Codes''' and make sure at least one state tax code is active.&lt;br /&gt;
## Go to '''Company Maintenance''' and set up a company.&lt;br /&gt;
# Make your payroll formula changes.&lt;br /&gt;
# Create several employees and do a test run to make sure all calculations are correct.&lt;br /&gt;
# Use the '''&amp;lt;CTRL&amp;gt;+''' function in Timecard Maintenance to do basic testing, then a '''Calculate Payroll''' run for full testing.&lt;br /&gt;
# If there are any self-correcting formulas, do several runs, including runs that will leave employees below, at and above the threshholds.&lt;br /&gt;
# When testing is complete, backup the database.&lt;br /&gt;
# Go to '''Setup/Utilities''' and export the configuration.&lt;br /&gt;
# Restore your clean database.&lt;br /&gt;
# Re-import the newly creating configuration files to assure they will load correctly.&lt;br /&gt;
# Notify development and support staff of the change.&lt;br /&gt;
&lt;br /&gt;
=== '''P'''ayroll '''OP'''erations (POP) ===&lt;br /&gt;
&lt;br /&gt;
Payroll formulas are based on the following Payroll Operations codes.&amp;lt;BR&amp;gt;&lt;br /&gt;
Optional parameters and default values are enclosed in square brackets [].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! OP&lt;br /&gt;
! OPERATION&lt;br /&gt;
! PARAMETERS&lt;br /&gt;
! DESCRIPTION&lt;br /&gt;
|- &lt;br /&gt;
| 1&lt;br /&gt;
| ADD&lt;br /&gt;
| [P1] P2 [P3]&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2 + P3 [0]&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| SUBTRACT&lt;br /&gt;
| [P1] P2 P3&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2 - P3&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| MULTIPLY&lt;br /&gt;
| [P1] P2 P3&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2 * P3.  Use CONTROL_FLAG to specify number of digits after the decimal (0-4).&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| DIVIDE&lt;br /&gt;
| [P1] P2 P3&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2 / P3.  Use CONTROL_FLAG to specify number of digits after the decimal (0-4). Note that P3 cannot be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| MOD&lt;br /&gt;
| [P1] P2 P3&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2 MOD P3.  MODULUS gives you the remainder of a division.  Eg: 8 MOD 3 = 2. Note that P3 cannot be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| CLEAR&lt;br /&gt;
| [P1]&lt;br /&gt;
| Sets P1 [SELF.CUR] to zero. &lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| ABS&lt;br /&gt;
| [P1] P2&lt;br /&gt;
| Sets P1 [SELF.CUR] to the Absolute Value of P2.&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SET&lt;br /&gt;
| [P1] P2&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| MIN&lt;br /&gt;
| [P1] P2 P3&lt;br /&gt;
| Sets P1 [SELF.CUR] to the lower value of P2 or P3.&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| MAX&lt;br /&gt;
| [P1] P2 P3&lt;br /&gt;
| Sets P1 [SELF.CUR] to the higher value of P2 or P3.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| EXIT&lt;br /&gt;
| &lt;br /&gt;
| Exits processing this definition.&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| WRITE&lt;br /&gt;
| P1&lt;br /&gt;
| Sets value of Employee Factor name specified in P1.&amp;lt;BR&amp;gt;&lt;br /&gt;
'''*** Feature not yet implemented ***'''&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| WARN&lt;br /&gt;
| &lt;br /&gt;
| Generates warning in COMMENTS (explanation) field to the WARNINGS tab and on the CALCULATE PAYROLL list.&amp;lt;BR&amp;gt;&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
*Setting CONTROL_FLAG to 9 will prevent payroll from being processed.&amp;lt;BR&amp;gt;&lt;br /&gt;
*Comments can display Data values by using square Brackets ('''[''' and ''']'''), e.g. &amp;lt;PRE&amp;gt;Current value for [DEF_ID] is [self.cur]&amp;lt;/PRE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| DEBUG&lt;br /&gt;
| P1&lt;br /&gt;
| Reports P1's value to a log.  If not specified, dumps '''self.cur''' and all variables.&amp;lt;BR&amp;gt;&lt;br /&gt;
'''*** Feature not yet implemented ***'''&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| IF&lt;br /&gt;
| P1 [P2] [P3]&lt;br /&gt;
| P1 = field or variable&amp;lt;br&amp;gt;P2 = logical operator ('''&amp;lt;''', '''&amp;gt;''', '''=''', '''&amp;lt;&amp;gt;''', '''&amp;lt;=''', '''&amp;gt;=''')&amp;lt;br&amp;gt;P3 = field, variable or constant&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| ELSE&lt;br /&gt;
| &lt;br /&gt;
| Specifies the alternate path for an IF statement.&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| ENDIF&lt;br /&gt;
| &lt;br /&gt;
| Terminates an IF statement.&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| WARNIF&lt;br /&gt;
| P1 [P2] [P3]&lt;br /&gt;
| Similar to '''IF''', if evaluates true, returns the contents of COMMENTS in the log.&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| PROMPTIF&lt;br /&gt;
| P1 [P2] [P3]&lt;br /&gt;
| Similar to '''WARNIF'''. If evaluates true, opens dialog box with COMMENTS in the prompt, allows user to Continue, Skip Definition, Skip Employee or Abort run.  CONTROL_FLAG sets the default selection (0 = continue, 1 = abort)&amp;lt;BR&amp;gt;&lt;br /&gt;
'''*** Feature no longer implemented ***'''&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| EXITIF&lt;br /&gt;
| &lt;br /&gt;
| Similar to '''IF'''. If evaluates true, exits processing of this definition for the employee.&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| STOPIF&lt;br /&gt;
| P1 [P2] [P3]&lt;br /&gt;
| Similar to '''IF'''. If evaluates true, logs COMMENT field value, warns user and exits payroll processing run.&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| PROCESSXREF&lt;br /&gt;
| [P1] P2 [P3]&lt;br /&gt;
| Sets P1 [SELF.CUR] = XREF result, P2 = code type (&amp;quot;D&amp;quot;, &amp;quot;X&amp;quot;, etc.), P3 (optional) = Definition Id&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| SUMDEFTYPE&lt;br /&gt;
| [P1] P2 [P3]&lt;br /&gt;
| Sets P1 [SELF.CUR] = SumDefType result, P2 = definition type (&amp;quot;D&amp;quot;, &amp;quot;X&amp;quot;, etc.), P3 (optional) = Filter&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| CALCTAX&lt;br /&gt;
| [P1] [P2] [P3]&lt;br /&gt;
| Sets SELF.CUR = Payroll Tax Library result, P1 = net pay to this point, P2 = tax library param 1 override, P3 = tax library param 2 override&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| TIMECARD&lt;br /&gt;
| [P1] P2 [P3]&lt;br /&gt;
| Sets P1 [SELF.CUR] = sum of timecard values, P2 = Timecard type (&amp;quot;HOURS&amp;quot;, &amp;quot;PAY&amp;quot;, &amp;quot;REIMB&amp;quot;, &amp;quot;DAYS&amp;quot;), P3 = Filter&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| MACRO&lt;br /&gt;
| P1&lt;br /&gt;
| Calls Macro named in P1.  Macro names must have double quotes on each side of the name.  Macros may be nested.&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| EVENT&lt;br /&gt;
| P1 P2 [P3]&lt;br /&gt;
| Generates an entry in the employee's EVENT history. P1 = Event Type, P2 = Amount, P3 = Trx Type to link to. Writes COMMENTS value to log as well.&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| APBEGIN&lt;br /&gt;
| P1 P2 P3&lt;br /&gt;
| Prepares an A/P output record. P1 = Addenda Format, P2 = Vendor ID, P3 = A/P Amount. &lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| APFIELD&lt;br /&gt;
| P1 [P2]&lt;br /&gt;
| Sets a field to a value in the A/P output record. P1 = Field Name, P2 = Field Value [empty string].&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| APEND&lt;br /&gt;
| [P1] [P2]&lt;br /&gt;
| Writes an A/P output record. P1 = Expense G/L Account, P2 = A/P Invoice Description.&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| SETNZ&lt;br /&gt;
| [P1] P2 [P3]&lt;br /&gt;
| Sets P1 [SELF.CUR] = P2 if P2 is not zero, otherwise sets P1 = P3 [leaves P1 unchanged].&amp;lt;BR&amp;gt;&lt;br /&gt;
'''*** Requires Keystone 3.2.4 or higher ***'''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Working With Definition Values==&lt;br /&gt;
&lt;br /&gt;
===Standard Definition Suffixes===&lt;br /&gt;
** '''.cur''' - current value&lt;br /&gt;
** '''.MTD''' - Month-to-date value&lt;br /&gt;
** '''.QTD''' - Quarter-to-date value&lt;br /&gt;
** '''.YTD''' - Year-to-date value&lt;br /&gt;
** '''.&amp;lt;factorname&amp;gt;''' - returns value of the factor.&lt;br /&gt;
** '''.isovr''' - returns true/false value based on an override value entered in the Timecard.&lt;br /&gt;
** '''.ovr''' - returns the override value from the Timecard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* A definition can only update itself or accumulators.  It cannot update another definition.&lt;br /&gt;
* A definition can read values of any other definition's values by using a '''.CUR''', '''.MTD''', '''.QTD''', '''.YTD''' suffix.&lt;br /&gt;
* All definitions reference themselves using the '''self''' prefix. (Eg: '''self.cur''')&lt;br /&gt;
* Definition variables are prefixed by '''defvar.''' (&amp;lt;u&amp;gt;Def&amp;lt;/u&amp;gt;inition &amp;lt;u&amp;gt;Var&amp;lt;/u&amp;gt;iable).  Eg: '''defvar.calc_rate'''&lt;br /&gt;
* Definition variables in one definition will not carry their value to another definition, but they '''DO''' carry into any macros called within the definition.&lt;br /&gt;
&lt;br /&gt;
===System Variables===&lt;br /&gt;
*System variables are prefixed by '''sysvar.''' (&amp;lt;u&amp;gt;Sys&amp;lt;/u&amp;gt;tem &amp;lt;u&amp;gt;Var&amp;lt;/u&amp;gt;iable).  Eg: '''sysvar.pdsded'''&lt;br /&gt;
*System variables can be referenced by any Definition.&lt;br /&gt;
*System variables cannot be changed by a formula.&lt;br /&gt;
&lt;br /&gt;
Common system variables:&lt;br /&gt;
*'''sysvar.pdsded''' - Deduction Periods&lt;br /&gt;
*'''sysvar.pdstax''' - Tax Periods&lt;br /&gt;
*'''sysvar.dedweek''' - Deduction Week&lt;br /&gt;
*'''sysvar.payfreq''' - Pay Frequency&lt;br /&gt;
*'''sysvar.chkdate''' - Check Date&lt;br /&gt;
*'''sysvar.pdbegin''' - Period Begin&lt;br /&gt;
*'''sysvar.pdend''' - Period End&lt;br /&gt;
&lt;br /&gt;
==Def Type Codes==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;  &lt;br /&gt;
! VALUE&lt;br /&gt;
! DESCRIPTION (SUMDEFTYPE / PROCESSXREF)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;A&amp;quot;&lt;br /&gt;
| Total of all Direct Deposits&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;D&amp;quot;&lt;br /&gt;
| Total of all Deductions.  You may specify '''&amp;quot;COMPANY_PAID=N&amp;quot;''' in P3 to exclude company-paid items.&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;R&amp;quot;&lt;br /&gt;
| Get total of all reimbursements (non-taxable income)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;T&amp;quot;&lt;br /&gt;
| Get total of all taxes.    You may specify '''&amp;quot;COMPANY_PAID=N&amp;quot;''' in P3 to exclude company-paid items.&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;X&amp;quot;&lt;br /&gt;
| Total of all Tax-Exempt deductions&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;  &lt;br /&gt;
! VALUE&lt;br /&gt;
! DESCRIPTION (TIMECARD)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;PAY&amp;quot;&lt;br /&gt;
| Total of all PAY definition types.&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;HOURS&amp;quot;&lt;br /&gt;
| Total of all HOURS definition types.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Commonly used MACROS ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;  &lt;br /&gt;
! MACRO&lt;br /&gt;
! USAGE&lt;br /&gt;
|- &lt;br /&gt;
| @BALANCE&lt;br /&gt;
| Validates payment ('''defvar.payment''') against balance ('''defvar.balance''').&lt;br /&gt;
If a negative payment is made, it adds to the balance and sets a warning level of 2.&lt;br /&gt;
|-&lt;br /&gt;
| @CONVRATE&lt;br /&gt;
| Converts integer ('''self.RATE''') factor into a decimal defvar.rate.&lt;br /&gt;
Doesn't allow a value less than 0 or greater than 1.&lt;br /&gt;
|-&lt;br /&gt;
| @CURLIM&lt;br /&gt;
| Compares '''self.cur''' to '''self.CUR_LIMIT''' factor (if it exists).&lt;br /&gt;
If there is no current limit factor, or if it's zero, it leaves '''self.cur''' untouched.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it assures that the self.cur does not exceed the limit.&lt;br /&gt;
|-&lt;br /&gt;
| @GETBAL&lt;br /&gt;
| Calculates the balance of the current definition, stored in '''defvar.balance'''&lt;br /&gt;
|-&lt;br /&gt;
| @GETDDAMT&lt;br /&gt;
| Calculates the Direct Deposit amount, storing it in '''defvar.dd_tot'''&lt;br /&gt;
|-&lt;br /&gt;
| @GETFEDXM&lt;br /&gt;
| Calculates the amount not subject to Fed Withholding, storing it in '''defvar.fed_exemptions'''&lt;br /&gt;
|-&lt;br /&gt;
| @GETFICAXM&lt;br /&gt;
| Calculates the amount not subject to FICA withholding, storing it in '''defvar.fica_exemptions'''&lt;br /&gt;
|-&lt;br /&gt;
| @GETGRS&lt;br /&gt;
| Calculates the gross pay, storing it in '''defvar.gross_pay'''&lt;br /&gt;
|-&lt;br /&gt;
| @GETMCXM&lt;br /&gt;
| Calculates the amount not subject to Medicare withholding, storing it in '''defvar.mc_exemptions'''&lt;br /&gt;
|-&lt;br /&gt;
| @GETNAT&lt;br /&gt;
| Calculates '''N'''et '''A'''fter '''T'''axes, storing it in '''defvar.net_after_taxes'''.&lt;br /&gt;
''Note: This number represents Net Pay minus Taxes - deductions are not included in this figure.&lt;br /&gt;
|-&lt;br /&gt;
| @GETNET&lt;br /&gt;
| Calculates the current net pay, storing it in '''defvar.net_pay'''&lt;br /&gt;
''Note: This number is will included all deductions taken at the time of the processing, so can vary in each calculation.&lt;br /&gt;
|-&lt;br /&gt;
| @GETSTXM&lt;br /&gt;
| Calculates the amount not subject to State Withholding, storing it in '''defvar.state_exemptions'''&lt;br /&gt;
|-&lt;br /&gt;
| @MINPAY$&lt;br /&gt;
| Gets the current net pay (using '''@GETNET'''), determines the minimum pay from the '''self.MIN_PAY''' factor&lt;br /&gt;
and calculates the remaining ('''defvar.remaining''') from the '''self.MIN_PAY''' factor.&lt;br /&gt;
|-&lt;br /&gt;
| @MINPAY%G&lt;br /&gt;
| Gets the current gross pay (using '''@GETGRS''') determines the minimum pay from the '''self.MIN_PAY_%''' factor &lt;br /&gt;
and calculates the remaining ('''defvar.remaining''') from the '''self.MIN_PAY''' factor.&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: This macro is not used in baseline formulas.''&lt;br /&gt;
|-&lt;br /&gt;
| @MTDLIM&lt;br /&gt;
| Compares '''self.MTD''' (including the current deduction) to '''self.MTD_LIMIT''' factor (if it exists).&lt;br /&gt;
If there is no MTD limit factor, or if it's zero, it leaves '''self.cur''' untouched.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it assures that the self.cur does not push the MTD to exceed the limit.&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: This macro is not used in baseline formulas.''&lt;br /&gt;
|-&lt;br /&gt;
| @OVRPAY&lt;br /&gt;
| Override payment logic.  Takes the override over '''self.PAYMENT''' factor without any limit checking.&lt;br /&gt;
|-&lt;br /&gt;
| @PRMPT&amp;gt;NET&lt;br /&gt;
| Prompts user for an action if '''self.cur''' exceeds the current Net Pay (from '''@GETNET''')&lt;br /&gt;
''Note: This macro is not used in baseline formulas.''&lt;br /&gt;
|-&lt;br /&gt;
| @PYCHKLIM&lt;br /&gt;
| Compares '''self.cur''' to '''self.CHK_LIMIT''' factor (if used), makes sure '''self.cur''' cannot exceed limit.&lt;br /&gt;
''Note: This macro is not used in baseline formulas.''&lt;br /&gt;
|-&lt;br /&gt;
| @QTDLIM&lt;br /&gt;
| Compares '''self.QTD''' (including the current deduction) to '''self.QTD_LIMIT''' factor (if it exists).&lt;br /&gt;
If there is no QTD limit factor, or if it's zero, it leaves '''self.cur''' untouched.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it assures that the self.cur does not push the MTD to exceed the limit.&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: This macro is not used in baseline formulas.''&lt;br /&gt;
|-&lt;br /&gt;
| @STOP&amp;gt;NET&lt;br /&gt;
| Stops processing (returns a status code of 9) if '''self.cur''' exceeds the current net (from '''@GETNET''').&lt;br /&gt;
This macro is typically used in troubleshooting, added to formulas during testing and removed before implementation.&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: This macro is not used in baseline formulas.''&lt;br /&gt;
|-&lt;br /&gt;
| @WARN&amp;gt;50%&lt;br /&gt;
| Warns the user if '''self.cur''' exceeds 50% of the current net (from '''@GETNET''')&lt;br /&gt;
This macro is typically used in Child Support and Garnishment calculations.&lt;br /&gt;
|-&lt;br /&gt;
| @WARN&amp;gt;NET&lt;br /&gt;
| Warns the user if the '''self.cur''' exceeds the current net (from '''@GETNET''')&lt;br /&gt;
|-&lt;br /&gt;
| @WEEK&lt;br /&gt;
| Used to see if a deduction is active in the current week.  Zeroes out '''self.cur''' if it shouldn't be active.&lt;br /&gt;
''Note: Overrides will always ignore this test!''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Definition-dependent formulas ===&lt;br /&gt;
The following formulas have hardcoded Definition IDs in them.  &amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Please review all of these formulas carefully before using!!&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;  &lt;br /&gt;
! MACRO&lt;br /&gt;
! USAGE&lt;br /&gt;
|- &lt;br /&gt;
| *ADVANCE&lt;br /&gt;
| Used in conjuction with the '''ADVPAY''' Income Definition, this formula is for handling payroll advances (loans).&lt;br /&gt;
|-&lt;br /&gt;
| *PERREM&lt;br /&gt;
| Used in conjunction with the '''PERHRS''' Income Definition.  This formula is used to track Personal Hours taken&lt;br /&gt;
and remaining by comparing the Personal Hours balance (as a non-monetary loan) to the Personal Hours being taken.&amp;lt;br&amp;gt;&lt;br /&gt;
If an employee exceeds his earned Personal Hours, a warning is issued but the payroll will calculate to completion.&lt;br /&gt;
|-&lt;br /&gt;
| *SUTAVALID&lt;br /&gt;
| This formula is used to validate the SUTA basis numbers.  You must edit this formula and change the SUTA definition.&lt;br /&gt;
|-&lt;br /&gt;
| *TAXBEN&lt;br /&gt;
| Used in conjunction with the '''TAXBEN''' Income Definition, this formula increases an employee's taxable gross wages.&lt;br /&gt;
Income in TAXBEN is included with the gross income when taxes are calculated.  This formula is then used in a deduction&amp;lt;br&amp;gt;&lt;br /&gt;
Definition PRIOR TO ALL OTHER DEDUCTIONS to remove this &amp;quot;income&amp;quot; from an employee's pay so the employee does not actually&amp;lt;br&amp;gt;&lt;br /&gt;
receive the monies which are treated as taxable income. This is most commonly applied to employees with company cars,&amp;lt;br&amp;gt;&lt;br /&gt;
company-paid life insurance, etc.&lt;br /&gt;
|-&lt;br /&gt;
| *VACREM&lt;br /&gt;
| Identical to *PERREM, except uses the '''VACHRS''' Income Definition.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Intra&gt;Chanson</name></author>
	</entry>
</feed>