fix: Consider only submitted salary slips
diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py
index d725f68..47c9d31 100644
--- a/erpnext/payroll/doctype/salary_slip/salary_slip.py
+++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py
@@ -429,11 +429,11 @@
 
 		if self.salary_structure:
 			self.calculate_component_amounts("deductions")
-		
+
 		self.set_loan_repayment()
 		self.set_component_amounts_based_on_payment_days()
 		self.set_net_pay()
-	
+
 	def set_net_pay(self):
 		self.total_deduction = self.get_component_totals("deductions")
 		self.base_total_deduction = flt(flt(self.total_deduction) * flt(self.exchange_rate), self.precision('base_total_deduction'))
@@ -1154,10 +1154,10 @@
 			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 @@
 			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