mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 18:29:08 +02:00
work on reports
This commit is contained in:
Binary file not shown.
@@ -162,11 +162,14 @@ class HrPayslip(models.Model):
|
|||||||
contract_ids = payslip.contract_id.ids or \
|
contract_ids = payslip.contract_id.ids or \
|
||||||
self.get_contract(payslip.employee_id, payslip.date_from, payslip.date_to)
|
self.get_contract(payslip.employee_id, payslip.date_from, payslip.date_to)
|
||||||
for input_line in payslip.input_line_ids:
|
for input_line in payslip.input_line_ids:
|
||||||
|
print('input====================',input_line.code)
|
||||||
|
loan_deduct = 0.0
|
||||||
|
other_deduct = 0.0
|
||||||
if input_line.code == 'LO':
|
if input_line.code == 'LO':
|
||||||
loan_deduct = input_line.amount
|
loan_deduct = input_line.amount
|
||||||
else:
|
if not input_line.code == 'LO':
|
||||||
other_deduct += input_line.amount
|
other_deduct += input_line.amount
|
||||||
print('tets+++++++++++++++++',loan_deduct,other_deduct)
|
print('tets+++++++++++++++++',input_line.code,loan_deduct,other_deduct)
|
||||||
for contract in self.contract_id:
|
for contract in self.contract_id:
|
||||||
total_salary = contract.wage + contract.other_allowance + contract.hra + contract.travel_allowance
|
total_salary = contract.wage + contract.other_allowance + contract.hra + contract.travel_allowance
|
||||||
net_salary = (total_salary -(loan_deduct + other_deduct) )
|
net_salary = (total_salary -(loan_deduct + other_deduct) )
|
||||||
@@ -182,8 +185,8 @@ class HrPayslip(models.Model):
|
|||||||
'housing_allowance':contract.hra,
|
'housing_allowance':contract.hra,
|
||||||
'travel_allowance':contract.travel_allowance,
|
'travel_allowance':contract.travel_allowance,
|
||||||
'total_salary':total_salary,
|
'total_salary':total_salary,
|
||||||
'loan_deduct': loan_deduct,
|
'loan_deduct': sum(input_line.amount for input_line in payslip.input_line_ids if input_line.code == 'LO'),
|
||||||
'monthly_deduct':other_deduct
|
'monthly_deduct':sum(input_line.amount for input_line in payslip.input_line_ids if not input_line.code == 'LO'),
|
||||||
'net_salary':net_salary
|
'net_salary':net_salary
|
||||||
})]
|
})]
|
||||||
print('list_value============',list_value)
|
print('list_value============',list_value)
|
||||||
|
|||||||
Reference in New Issue
Block a user