mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
Merge branch 'hotfix'
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
__version__ = '7.1.21'
|
||||
__version__ = '7.1.22'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -79,9 +79,9 @@ class Timesheet(Document):
|
||||
self.status = "Completed"
|
||||
|
||||
def set_dates(self):
|
||||
if self.docstatus < 2:
|
||||
start_date = min([d.from_time for d in self.time_logs])
|
||||
end_date = max([d.to_time for d in self.time_logs])
|
||||
if self.docstatus < 2 and 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)
|
||||
|
||||
Reference in New Issue
Block a user