How To Create A Pay Sheet For My Country
Principles of inheritance
A new concept that make the new Payroll module very more usable is the Inheritance principle :
A PaySheet inherits from a model, and this model could inherit from some other models wich could inherit from other models ... In a company, this permit to seperate contributions who are applied in certain condition (eg. for a precise employee group), this could be representated with the following schema :
Create a Pay Sheet Model
In first, you must install the 'erp5_payroll' Business Template, and the corresponding localized Business Template (e.g. : 'erp5_payroll_l10n_fr' for France), if it does not exist, it is recommended to create it by using the following tutorial: HowToMyCountryPaySheet. After installing the 'erp5_payroll' and localized Business template, the first step is to create a model.
- Go to the Pay Sheet Model Module and 'add Pay Sheet Model' from the action menu and filled the fields.
The employer, employee and currency will be copied in the pay sheet if those here are empty. If Absolute Payment Date is filled, it will create a Payment Condition with it. The Work Duration Unit and Work Duration are used to indicate the worked time for this period. An Annotation Line is created, when these fields are filled. Annotation Lines are designed to display informations on pay sheets, but at the moment they are not yet used in the rendering of it. Settings Categories are the base categories used to create the slices. It corresponds more or less to the laws of that model. A country contain only slices categories used in this particular country. It is possible to add a category and the slices for your country or category for your business. To do this, go to the 'portal_categories' module and add sub-categories in the salary_range category. When this first page is filled, save your data.
- After that, if you selected something in the Settings Categories you must see new lines in the Settings Slice tab.
These new lines correspond to slices that it is now possible to use. You must define a minimum and maximum value for each of the ones you want to use. The slices objects are created when you save. If you want, you could now add some Annotation Lines, Payment Conditions or Ratio Settings but it's not necessary for a minimal Pay Sheet Model.
- After completing the fields of the model, we must add Model Lines representing the contributions that you want to appear on the pay sheet. To add a Model Line, use 'Add Model Line' from action menu.
Now You must select the Payroll Service corresponding to the contribution you want to add. If it doesn't exists, add it (don't forget to select slices in variation range if you want to use slices with this contribution). The Service Provider is the organization who collects the tax (a contribution is generally the payment of a service, social or otherwise..., it's this organization account that will be used in the accounting calculations). If the Editable check box is checked, that's mean that the amount/percentage will be (re)asked at the calculation step. This permits to use a same model with many employees although some values vary from one employee to another.
The Base Application is used to set the amount on which the contribution will be applied.
- e.g. : We have a contribution called "old age insurance" wich is 6.55 percent of the gross_salary for the employee and 8.20 percent of the gross_salary for employer. To represent this contribution, we can create a new Model Line and filled Title, Payroll Service and Service Provider. In the Base Application List Field, we select 'Base Salary' and 'Bonus' because the gross salary is composed by this two elements. In the Variation Parallel List Field, we select the good slice and the good shares (here it's 'Employer Share' and 'Employee Share'). After saving, a matrixbox should appear on the bottom, here, we can fill the two fields 'Percentage' of the 'Employee Share' and 'Employer Share' with the 6.55 and 8.20 values. This mean, this contribution will be 6.55% of the gross salary for employees and 8.20% for employer.
If the contribution that you are adding is applied to nothing (such as salary, for example) do not select anything. The amounts of the Base Application are determined at the calculation step with selected categories in the Base Participation list in the Payroll Services. When this is done, save your data. If your Payroll Service has slices selected in the variation range, you must now see those same variations that can be used for this contribution. Select the ones you want, and save.
After this, you must see some new lines at the bottom of the page. This ones corresponds to rate or share to applied in this slice. If your contribution depend on a percentage of an amount, just fill in the 'percentage', if the contribution is an amount, fill just the first column.
Now your first model line is created. I recommend to add others, such as one concerning the salary (and whose Base Participation of Payroll Service is base_salary) if no service with the base the contributions apply to is used, then the amount of pay sheet lines likely to be null.
- After completing and registered your line model, you can, in the 'Predicate' tab, define the conditions in which this contribution will be applied.
This allows, for example, to use the same model for one company, with a predicate for director, worker and engineers. If this contribution have a predicate with just Worker, that's mean, at the moment of the calculation, only person with grade 'Worker' will have this contribution applied.
Create a Pay Sheet Transaction
- Go to the Accounting Module and 'add Pay Sheet Transaction' from the action menu and filled the fields.
If you have well completed your model, you do not have a lot of fields to be filled, only the title, start/end work period and the model you want to use are needed. Once these fields are completed and saved, you can use the function 'Apply Pay Sheet Model' from the action menu, which would fill in the missing fields and copy the sub objects in the model (such as Annotation Lines) in the payroll. If everything looks correct, then you can start the calculation with the 'Calculation of the Pay Sheet Transaction' from the Action menu. After this, if you have check some editable check boxes, the corresponding value will be requested, after filled them, click on 'Calculate The Pay Sheet Transaction' to have the pay sheet lines.