Merge pull request #24313 from deepeshgarg007/ytd_error_fix_v13
fix: Consider only submitted salary slips
This commit is contained in:
commit
f2863f9d16
@ -1154,10 +1154,10 @@ class SalarySlip(TransactionBase):
|
||||
filters = {'employee_name' : self.employee_name,
|
||||
'start_date' : ['>=', period_start_date],
|
||||
'end_date' : ['<', period_end_date],
|
||||
'name': ['!=', self.name]
|
||||
'name': ['!=', self.name],
|
||||
'docstatus': 1
|
||||
})
|
||||
|
||||
|
||||
year_to_date = flt(salary_slip_sum[0].sum) if salary_slip_sum else 0.0
|
||||
|
||||
year_to_date += self.net_pay
|
||||
@ -1171,7 +1171,8 @@ class SalarySlip(TransactionBase):
|
||||
filters = {'employee_name' : self.employee_name,
|
||||
'start_date' : ['>=', first_day_of_the_month],
|
||||
'end_date' : ['<', self.start_date],
|
||||
'name': ['!=', self.name]
|
||||
'name': ['!=', self.name],
|
||||
'docstatus': 1
|
||||
})
|
||||
|
||||
month_to_date = flt(salary_slip_sum[0].sum) if salary_slip_sum else 0.0
|
||||
|
Loading…
Reference in New Issue
Block a user