Merge pull request #7158 from rohitwaghchaure/timesheet_issue_po

minor issue
This commit is contained in:
Nabin Hait 2016-12-08 12:15:44 +05:30 committed by GitHub
commit cfe6182798
2 changed files with 2 additions and 3 deletions

View File

@ -296,4 +296,3 @@ def save_invoice(e, si_doc, name):
si_doc.docstatus = 0
si_doc.flags.ignore_mandatory = True
si_doc.insert()
frappe.log_error(frappe.get_traceback())

View File

@ -80,8 +80,8 @@ class Timesheet(Document):
def set_dates(self):
if self.docstatus < 2 and 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])
start_date = min([getdate(d.from_time) for d in self.time_logs])
end_date = max([getdate(d.to_time) for d in self.time_logs])
if start_date and end_date:
self.start_date = getdate(start_date)