Fix report planilla pila
This commit is contained in:
parent
3ae22ef873
commit
88ea60f1f3
|
@ -0,0 +1 @@
|
|||
,wgs,wgs-Lenovo-ideapad-330S-14IKB,08.02.2021 18:01,file:///home/wgs/.config/libreoffice/4;
|
Binary file not shown.
13
payroll.py
13
payroll.py
|
@ -1037,11 +1037,15 @@ class PayrollPaycheckReport(Report):
|
|||
periods = [p.name for p in Period.browse(data['periods'])]
|
||||
total = []
|
||||
for payroll in payrolls:
|
||||
|
||||
employee_id = payroll.employee.id
|
||||
health_amount = cls.get_amount_move(payroll, 'health')
|
||||
retirement_amount = cls.get_amount_move(payroll, 'retirement')
|
||||
risk_amount = cls.get_amount_move(payroll, 'risk')
|
||||
box_family_amount = cls.get_amount_move(payroll, 'box_family')
|
||||
fsp_amount = cls.get_amount_move(payroll, 'fsp')
|
||||
salary = payroll.contract.salary
|
||||
worked_days = payroll.worked_days
|
||||
|
||||
if data['values_without_move']:
|
||||
health_amount = cls._values_without_move(payroll, 'health')
|
||||
|
@ -1070,6 +1074,10 @@ class PayrollPaycheckReport(Report):
|
|||
'type_id': 'CC',
|
||||
'id_number': payroll.employee.party.id_number,
|
||||
'employee': payroll.employee.party.name,
|
||||
'start_date': payroll.contract.start_date,
|
||||
'end_date': payroll.contract.end_date,
|
||||
'salary_base': salary,
|
||||
'days': worked_days,
|
||||
'type_affiliation': 'D',
|
||||
'year': payroll.date_effective.year,
|
||||
'date': today,
|
||||
|
@ -1084,19 +1092,22 @@ class PayrollPaycheckReport(Report):
|
|||
'ibc': payroll.ibc,
|
||||
'eps_amount': health_amount,
|
||||
'afp_amount': retirement_amount,
|
||||
'fsp_amount': fsp_amount,
|
||||
'arl_amount': risk_amount,
|
||||
'box_amount': box_family_amount,
|
||||
'subtotal': subtotal
|
||||
}
|
||||
else:
|
||||
|
||||
res[employee_id]['days'] += worked_days
|
||||
res[employee_id]['eps_amount'] += health_amount
|
||||
res[employee_id]['afp_amount'] += retirement_amount
|
||||
res[employee_id]['fsp_amount'] += fsp_amount
|
||||
res[employee_id]['arl_amount'] += risk_amount
|
||||
res[employee_id]['box_amount'] += box_family_amount
|
||||
res[employee_id]['ibc'] += payroll.ibc
|
||||
res[employee_id]['subtotal'] += subtotal
|
||||
total.append(subtotal)
|
||||
|
||||
report_context['total'] = sum(total)
|
||||
report_context['records'] = res.values()
|
||||
report_context['periods'] = periods
|
||||
|
|
Loading…
Reference in New Issue