This question has been flagged
6 Replies
15907 Views

Good Day

I'm testing the Payroll App, and i want to add a salary rule of Social Security of Venezuela, but i have a problem, this rule is based in minimum Wage = 4889.11 Bs.F, i mean, if an employee gains minimun wage and always give 4% to social security, for this i use the code

(((contract.wage * 12) / 52) * 0.04) * 2 
 

But if an employee gains more than minimun wage y have to do this code

((((4889.11 * 5) * 12) / 52) * 0.04) * 2

and about 0.04 is always the 4% from employees... the code applies for companies too but with a diference, in Venezuela there's 3 types of companies, low risk who gives 9% to social security using this code

(((contract.wage * 12) / 52) * 0.09) * 2

((((4889.11 * 5) * 12) / 52) * 0.09) * 2  Depending if employee gains more than minimun wage

other companies are medium risks and give 10 % and use the code

(((contract.wage * 12) / 52) * 0.10) * 2

((((4889.11 * 5) * 12) / 52) * 0.10) * 2  Depending if employee gains more than minimun wage

and there are companies with high risks and give 11% to social security

(((contract.wage * 12) / 52) * 0.11) * 2

((((4889.11 * 5) * 12) / 52) * 0.11) * 2  Depending if employee gains more than minimun wage

My Question is, How can i check the company's type (low, medium or high) and how can i check if employee gains minimum wage or more and obtain the value for this salary rule and apply the respective code?

Avatar
Discard

Minimum wage is probably the contract.wage !

Author

Thank you, i got the idea...based in your code, i used this if contract.wage

Best Answer

Let's call this rule IVSSEMPLOYEE. It should be computed as follow (this implies that all contract.wage are => 4889.11):

if contract.wage = 4889.11:
     result = (((contract.wage * 12) / 52) * 0.04) * 2 
elif 4889.11 < contract.wage <= 24455.55:
    result = ((((contract.wage * 5) * 12) / 52) * 0.04) * 2
else:
    result = ((((24455.55 * 5) * 12) / 52) * 0.04) * 2

Avatar
Discard

Do you have any comment ?

24445.55 = The maximum contribution basis

Author Best Answer

no Med Said BARA, minimun wage in this country is 4889.11, sometimes an employee wins 4889.11, but other employees wins 6000 example:
Employee 1: contract.wage = 4889.11

Employee 2: contract.wage = 6000

i need to do a salary rule with python code that check if an employee wins 4889.11 or 6000 and apply the respective code.

Avatar
Discard