Go to Workstem

Long Service Payment

Step 1 Terminate the employee in the system

Step 2 Customize user field
go to [Settings] > [Customize user field], add a new item, it can be LSP/SP

Step 3 Dictionary

create new items, add the built-in dictionary to the new-customize user field, it can be shown in the staff information

Step 4 Create a new pay item- Long Service Payment


Formula- Long Service Payment
var vEntryDay = GetEmployeeInfo('entryDate');
var vLastDay = GetEmployeeInfo('lastWorkingDate');
var vServiceYear = round((DateDiff(DAY,vEntryDay,vLastDay) + 1) / 365,2,) ;
var vLastMonthSalary = PayItemMthlySome('ADWIncomeCurrentMonth',1,1);
var vAvg12Salary = PayitemMthlyTotal ('ADWIncomeCurrentMonth', 12, 0) / 12;
var vType = GetEmployeeInfo('LSP/SP');
var vBaseSalary = 0;
if(vServiceYear >= 5 && vAvg12Salary >= vLastMonthSalary && vType != 'SP' ){
if ( vAvg12Salary >= 22500 ) {
vBaseSalary = 22500
}
else {
vBaseSalary = vAvg12Salary
}
}else if(vServiceYear >= 5 && vAvg12Salary < vLastMonthSalary && vType != 'SP'){
if ( vLastMonthSalary >= 22500 ) {
vBaseSalary = 22500
}
else {
vBaseSalary = vLastMonthSalary
}
}else{
vBaseSalary = 0;
}

value = vBaseSalary / 3 * 2 * vServiceYear

Payment in lieu of Notice

Step 1 Customize user field
go to [Settings] > [Customize user field], add two new items: [Notice Type](text) & [Short Notice Last Date](date)

Step 2 Dictionary

Create new items [EE & ER] here, add the built-in dictionary to the new-customize user field [Notice Type], which can be shown in the staff information

Step 3 Create new pay item

Create two pay items: for the employer, it should be income; for the employee, it should be deduction

Formula- payment in lieu of notice

1. Employer

var a = GetEmployeeInfo('ShortNoticeLastDate')

var b = GetEmployeeInfo('lastWorkingDate')

var c = DateDiff(DAY,b ,a ,)

var d = GetEmployeeInfo('NoticeType')

if ( d == 'ER' ) {

value = AverageDailyRate * c

}

else {

value = 0

}

2. Employee

var a = GetEmployeeInfo('ShortNoticeLastDate')

var b = GetEmployeeInfo('lastWorkingDate')

var c = DateDiff(DAY,b ,a ,)

var d = GetEmployeeInfo('NoticeType')

if ( d == 'EE' ) {

value = AverageDailyRate * c

}

else {

value = 0

}

Did this answer your question?