Merge pull request #19849 from rohitwaghchaure/fixed_timsheet_overlap_issue
fix: timesheet overlap error
This commit is contained in:
		
						commit
						c229a1b1d5
					
				| @ -188,7 +188,8 @@ class Timesheet(Document): | |||||||
| 			}, as_dict=True) | 			}, as_dict=True) | ||||||
| 		# check internal overlap | 		# check internal overlap | ||||||
| 		for time_log in self.time_logs: | 		for time_log in self.time_logs: | ||||||
| 			if not (time_log.from_time or time_log.to_time): continue | 			if not (time_log.from_time and time_log.to_time | ||||||
|  | 				and args.from_time and args.to_time): continue | ||||||
| 
 | 
 | ||||||
| 			if (fieldname != 'workstation' or args.get(fieldname) == time_log.get(fieldname)) and \ | 			if (fieldname != 'workstation' or args.get(fieldname) == time_log.get(fieldname)) and \ | ||||||
| 				args.idx != time_log.idx and ((args.from_time > time_log.from_time and args.from_time < time_log.to_time) or | 				args.idx != time_log.idx and ((args.from_time > time_log.from_time and args.from_time < time_log.to_time) or | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user