mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
Merge pull request #7157 from rohitwaghchaure/timesheet_po_issue
[fix] Timesheet datetime issue
This commit is contained in:
@@ -79,7 +79,7 @@ class Timesheet(Document):
|
|||||||
self.status = "Completed"
|
self.status = "Completed"
|
||||||
|
|
||||||
def set_dates(self):
|
def set_dates(self):
|
||||||
if self.docstatus < 2:
|
if self.docstatus < 2 and self.time_logs:
|
||||||
start_date = min([d.from_time for d in self.time_logs])
|
start_date = min([d.from_time for d in self.time_logs])
|
||||||
end_date = max([d.to_time for d in self.time_logs])
|
end_date = max([d.to_time for d in self.time_logs])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user