In sistem este definit regula salariala numita “Deducere personala de baza”
Acesta trebuie modificat in functie de legislatia curenta dar urmarind cu atentie perioadele de valabilitate.
In exemplu urmator se foloseste ca exemplu perioada 2015-2016. In 2016-01-01 se modifica legea astfel incat regula a trebuit modificata.
Noul mod de calcul se poate vedea aici.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
if not contract.functie_baza: dedpers=0 else: if payslip.date_from>='2016-01-01': dedpers=0 nrpers=0 coef_ded=0 if employee.pers_intretin_ids: for p in employee.pers_intretin_ids: if p.data_start < payslip.date_to and (not p.data_end or p.data_end>payslip.date_to): nrpers+=1 if nrpers==0: coef_ded=300 elif nrpers==1: coef_ded=400 elif nrpers==2: coef_ded=500 elif nrpers==3: coef_ded=600 else: coef_ded=800 if GROSS+BON_MASA <=1500: dedpers=coef_ded elif GROSS+BON_MASA <=3000: dedpers=coef_ded*(1-(GROSS+BON_MASA-1500)/1500) if int(dedpers/10) != dedpers/10 : dedpers= (int(dedpers/10)+1)*10 else: coef_ded=1 if employee.pers_intretin_ids: for p in employee.pers_intretin_ids: if not p.data_end and p.data_start < payslip.date_to: coef_ded+=0.4 if coef_ded>2.6: coef_ded=2.6 if GROSS+BON_MASA <=1000: dedpers=coef_ded*250 elif GROSS+BON_MASA <3000: dedpers=coef_ded*250*(1-(GROSS+BON_MASA-1000)/2000) if int(dedpers/10) != dedpers/10 : dedpers= (int(dedpers/10)+1)*10 else: dedpers=0 if GROSS==0: dedpers=0 result = dedpers |