This question has been flagged
5 Replies
6852 Views

Some deductions have a yearly limit per employee. Is there away to check these registers within a salary rule to determine if the maximum has been paid?

To elaborate:

In Canada we have two limited deductions, one of which is EI (employment Insurance) which deducts 1.88% of the total payslip up to a maximum of $891.12 within the year after which the deduction stops. In order to achieve this I am looking to add a Python Expression under condition that grabs the total contributions over the year period and if it is less then the $891.12 allow the payroll rule to proceed. My issue I am hitting is that I am unsure how to get the total of one register for the year to date within the condition rule.

Avatar
Discard
Author Best Answer

Okay found this out for myself under the example above, the following conditional statement will work assuming the rule name is EI:

result = payslip.sum('EI','2013-01-01',' 2013-12-31') > -891.12

Still would be nice not to have to change the formula every year. Any ideas?

Bit of a hack but you can use the contract start and end date to define the fiscal year:

result = payslip.sum('EI',contract.date_start,contract.date_end) > -891.12

Avatar
Discard
Best Answer

You can do analysis on Payslip lines with by grouping on contribution register and employee.. Or you have to go to Payroll Register report.

Avatar
Discard
Author

Can you give me a bit more details on this within the context of the payroll rules?

Yes, We can link Contribution register on Payroll/Salary rules which is going to be Payslip Lines once you prepare payslip for your employee... For eg. PF contribution: We will be having two different salary rules for PF deduction for employee one for Employee deduction and second for Employer deduction .. For employer deduction PF salary rules you can link or refer already create contribution register "PF Comapany Contribution" on it.. So all related payslip lines encoded in payslips will be visible on specific register..

Best Answer

This issue is solved with module hr_salary_rule_variable on https://github.com/OCA/hr/tree/7.0. Salary rules point on variables that change over the time. The whole salary structure for Canada is implemented and is currently in a PR to OCA: https://github.com/OCA/l10n-canada/pull/43. Reviews would be very appreciated.

Avatar
Discard