Generate Payslips
The option Generate Payslips here allows user to automatically add the employee payslips to the selected payslips batch. Here is the dashboard of Generate Payslips.
User cannot generate payslips without selected employee, if the user insists to generate payslips without the selected employee, then the system will displays error message like the picture below.
Selecting Employees
In selecting employees, there are 2 methods available. There are select all method and user can add an item manually.
Select All method allows user to select all the employees who are registered in the selected company and qualified by the selected rules. The rules itself refers to selecting employees id from hr_contract
table, hr_employee
table, and hr_admin_group
when the condition is that employee id in hr_contract
table is equal to id in hr_employee
table and the payroll admin id in hr_admin_group
table is equal to payroll admin id in hr_employee
table. The contract of an employee contains the start date and the end date of employee's working period, if the contract has been ended before the determined end date or the contract starts after the determined start date in the payslips, then that employee will not be selected.
All the employee id that qualified will be stored in an array variable self.employee_ids
, when the user select the Deselect All button, the system will set the self.employee_ids
to None
Whereas, if user chooses to select employee manually, then they have to choose employees from all the registered employees in the system. The user is allowed to choose employee from hr_employee
table.
When user selects the employees needed, then the system will display all the selected employees in the Employees table.
Generate
After selecting employees, user can generate the payslips if they are qualified. In this process it is important that all payslips batches have to have different period of time, if there is another payslips batch that has the same period of time, the latest created payslips batch cannot be generated.
The result when generating process is successfully done will be like the shown picture below.
Flowchart Process
Notes
If error on generate payslip with error message specifically mentioned any salary rules, please check the salary rules. In one case, the salary rules contains phyton code to get data attribute from remuneration while the attribute (werks eligible) in the selected company is not exists.
Payslips Batches that created cannot include the same company in the same period of time. Each company only allowed to have one payslips batches in every period of time.