CodingSeb.ExpressionEvaluator
Payroll Formula, Attendance Incentive Formula, Service Charge Formula
| Formula Code | Description | Sample | Output | Remarks |
| {#B} | Basic Salary from Job Service | 3000.00 | ||
| {#CD} | Calendar Day | 31 | Retro, Recurring Income, Express Entry: based on Transaction Date if not within payroll cycle date range.
Basic Salary: based on Payroll Cycle Start Date. |
|
| {#WD} | Get the total day according to day type selected in system parameter from calendar | 31 | ||
| {#SPB} | Hr_employee.salary_paid_by | “M” | ||
| {#SCB} | Hr_employee.salary_count_by | “M” | ||
| {#SWD} | Get the total working day include PH from duty roster | 31 | ||
| {#AWD} | Actual Working Day, Total day from ta_timesheet where (TypeOfDay is Working && Absent is false) or TypeOfDay is Public Holiday | 26 | ||
| {#SW} | Total Day from Duty Roster Calendar Where TypeOfDay is Working | 26 | ||
| {#SO} | Total Day from Duty Roster Calendar Where TypeOfDay is Off | 4 | ||
| {#SR} | Total Day from Duty Roster Calendar Where TypeOfDay is Rest | 4 | ||
| {#SP} | Total Day from Duty Roster Calendar Where TypeOfDay is Public Holiday | 2 | ||
| {#ABS} | Total Day of Absent from ta_timesheet follow by period | 3 | ||
| {#LATE} | Total minutes duration of Lateness from ta_timesheet follow by period | 23 | Return as integer type | |
| {#EO} | Total minutes duration of Early Out from ta_timesheet follow by period | 23 | Return as integer type | |
| {#LI} | Total minutes duration of Late In from ta_timesheet follow by period | 23 | Return as integer type | |
| {#OB} | Total minutes duration of Over Break from ta_timesheet follow by period | 23 | Return as integer type | |
| {#LATE><Minutes>} | Total Day where Lateness minutes > <Minutes> follow by period | {#OB>3} | 3 | |
| {#EO><Minutes>} | Total Day where Early Out minutes > <Minutes> follow by period | {#EO>3} | 3 | |
| {#LI><Minutes>} | Total Day where Late In minutes > <Minutes> follow by period | {#LI>3} | 3 | |
| {#OB><Minutes>} | Total Day where Over Break minutes > <Minutes> follow by period | {#OB>3} | 3 | |
| {#INPUT} | Input, will always take from pr_express_entry according to own code. | 10.00 | Priority: Amt (Amount) > Unit > Day > HM (HH.mm) | |
| {#DAY} | Payroll Transaction’s Day from Express Entry | 10.00 | ||
| {#UNIT} | Payroll Transaction’s Unit from Express Entry | 10.00 | ||
| {#HOUR_MIN} | Payroll Transaction’s Hour Minutes from Express Entry | 10.30 | ||
| {#AMOUNT} | Payroll Transaction’s Amount from Express Entry | 10.00 | ||
| {PR.<TrxCode>} | Return the value of payroll transaction code from database tables by priority.
|
{PR.OT1.5} | 10.00 | Priority : Amount > Unit > Day > HourMinutes |
| {PR.<TrxCode>.<Value>} | Return the column value for this payroll transaction code from database tables by priority.
|
{PR.OT1.5.HM} | 10.00 | Value => {Day, Unit, HM (HH.mm), Amt, AmtER} |
| {PV.<TrxCode>} | Return the value of previous month payroll transaction code from table [pr_transaction]. | {PR.OT1.5} | 10.00 | Priority : Amount > Unit > Day > HourMinutes |
| {PV.<TrxCode>.<Value>} | Return the column value of previous month payroll transaction code from table [pr_transaction]. | {PR.OT1.5.HM} | 10.00 | {Day, Unit, HM (HH.mm), Amt, AmtER} |
| {#OT} | Get total overtime hours of attendances in hour minutes (HH.mm)
p/s. Total overtime hours is get from table [ta_timesheet_overtime] |
2.45 | Use in Attendance Incentive, Service Charge Calculation | |
| {LV.<LeaveCode>} | Return total day of leave according to Payroll Period | {LV.UPL} | 5.00 | Used in Attendance Incentive |
| {#LD} | Total Leave Day for Service Charge Calculation follow by period
Please go to Admin Setting > Payroll > Service Charge Calculation Setting page to refer affected leave code list. |
2 | Used in Service Charge Calculation | |
| {#BF} | Get bonus factor from table [pr_bonus_header]. | 3 | Use in Bonus Calculation | |
| {EMP.<ColumnName>} | Get value from table [func_hr_employee_extend] according to <ColumnName>. | {EMP.employee_no} | Refer table [func_hr_employee_extend] for column list. | |
| {EMP.EmployeeGroup} | Get employee’s assigned group in string. | “AS”,”MS”,”TELE” | ||
| {UDF.<SectionCode>.<FieldCode>} | Return string value of Employee Profile’s User Defined Field | {UDF.ADDPR.ALD} | Input Value => “WOP”
One Selection DropDown => “WOP” Multi Selection DropDown => “WOP1″,”WOP2” |
For Multiselection DropDown,
in(“A”, {#UDF.ADDPR.TYPE1}) => in(“A”, “A”,”R”,”S”) |
Additional Criteria (Leave, Benefit, GL Template, Schedule Setting)
| Formula Code | Description | Sample | Output | Remarks |
| {#B} | Basic Salary from Job Service | 3000.00 | ||
| {#SPB} | Hr_employee.salary_paid_by | “M” | ||
| {#SCB} | Hr_employee.salary_count_by | “M” | ||
| {EMP.<ColumnName>} | Get value from table [func_hr_employee_extend] according to <ColumnName> | {EMP.employee_no} | Refer table [func_hr_employee_extend] for column list. | |
| {EMP.EmployeeGroup} | Get employee’s assigned group in string. | “AS”,”MS”,”TELE” | ||
| {UDF.<SectionCode>.<FieldCode>} | Return string value of Employee Profile’s User Defined Field | {UDF.ADDPR.ALD} | Input Value => “WOP”
One Selection DropDown => “WOP” Multi Selection DropDown => “WOP1″,”WOP2” |
For Multiselection DropDown,
in(“A”, {#UDF.ADDPR.TYPE1}) => in(“A”, “A”,”R”,”S”) |
Attendance Formula
| Formula Code | Description | Sample | Output | Remarks |
| {#B} | Basic Salary from Job Service | 3000.00 | ||
| {#SPB} | Hr_employee.salary_paid_by | “M” | ||
| {#SCB} | Hr_employee.salary_count_by | “M” | ||
| {EMP.<ColumnName>} | Get value from table [func_hr_employee_extend] according to <ColumnName>.
Get value from table [view_hr_employee_job_service] if <ColumnName> exists. |
{EMP.employee_no} | Refer table [func_hr_employee_extend] for column list. | |
| {EMP.EmployeeGroup} | Get employee’s assigned group in string. | “AS”,”MS”,”TELE” | ||
| {UDF.<SectionCode>.<FieldCode>} | Return string value of Employee Profile’s User Defined Field | {UDF.ADDPR.ALD} | Input Value => “WOP”
One Selection DropDown => “WOP” Multi Selection DropDown => “WOP1″,”WOP2” |
For Multiselection DropDown,
in(“A”, {#UDF.ADDPR.TYPE1}) => in(“A”, “A”,”R”,”S”) |
| {LV.LeaveHour} | Return total leave hours of attendance date | 4.30 | Not available for Schedule Break Setting. | |
| {LV.LeaveHour.<LeaveCode>} | Return leave hours of <LeaveCode> of attendance date | {LV.LeaveHour.UPL} | 5.00 | Not available for Schedule Break Setting. |
| {TA.ScheduleCode} | Return schedule code of attendance date | “NORMF” | ||
| {TA.Date} | Return date of attendance | 20210219 | Return date as integer | |
| {TA.TypeOfDay} | Return type of day of the schedule | “W”,”O”,”R”,”P” | ||
| {TA.DayOfWeek} | Return day of week to the attendance date | “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”, “Sun” | ||
| {TA.WorkHour} | Return work hours of attendance date | 8.30 | Not available for Schedule Break Setting. | |
| {TA.EarlyIn} | Return early in of attendance date | 0.15 | Not available for Schedule Break Setting. | |
| {TA.LateIn} | Return late in of attendance date | 0.15 | Not available for Schedule Break Setting. | |
| {TA.BreakHour} | Return break hour of attendance date | 1.00 | Not available for Schedule Break Setting. | |
| {TA.Overbreak} | Return overbreak of attendance date | 0.05 | Not available for Schedule Break Setting. | |
| {TA.EarlyOut} | Return early out of attendance date | 0.05 | Not available for Schedule Break Setting. | |
| {TA.LateOut} | Return late out of attendance date | 2.15 | Not available for Schedule Break Setting. | |
| {TA.Absent} | Return true/false whether the attendance is absent | “Y”, “N” | Not available for Schedule Break Setting. | |
| {TA.LeaveSession} | Return leave session of attendance date | “Full”, “First”, “Second” | Not available for Schedule Break Setting. | |
| {TA.OT} | Return total OT hours of attendance date | 4.15 | Not available for Schedule Break Setting. | |
| {TA.OT.<OTCode>} | Return OT hours of <OTCode> of attendance date | {TA.OT.OT15} | 4.15 | Not available for Schedule Break Setting. |
| {TA.Allowance.<AllowanceCode>} | Return unit of <AllowanceCode> of attendance date | {TA.Allowance.OT-ALLOW} | 3 | Not available for Schedule Break Setting. |