mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
minor fix
This commit is contained in:
@@ -25,8 +25,7 @@ class DocType(DocTypeNestedSet):
|
|||||||
def get_email_id(self):
|
def get_email_id(self):
|
||||||
profile = webnotes.conn.get_value("Employee", self.doc.employee, "user_id")
|
profile = webnotes.conn.get_value("Employee", self.doc.employee, "user_id")
|
||||||
if not profile:
|
if not profile:
|
||||||
webnotes.msgprint("User ID (Profile) not set for Employee %s" % self.doc.employee,
|
webnotes.throw("User ID (Profile) not set for Employee %s" % self.doc.employee)
|
||||||
raise_exception=True)
|
|
||||||
else:
|
else:
|
||||||
return webnotes.conn.get_value("Profile", profile, "email") or profile
|
return webnotes.conn.get_value("Profile", profile, "email") or profile
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ class DocType(TransactionBase):
|
|||||||
date_diff = (getdate(end_date) - getdate(start_date)).days
|
date_diff = (getdate(end_date) - getdate(start_date)).days
|
||||||
add_by = date_diff / no_of_visit
|
add_by = date_diff / no_of_visit
|
||||||
|
|
||||||
for visit in range(0, cint(no_of_visit)):
|
for visit in range(cint(no_of_visit)):
|
||||||
if (getdate(start_date_copy) < getdate(end_date)):
|
if (getdate(start_date_copy) < getdate(end_date)):
|
||||||
start_date_copy = add_days(start_date_copy, add_by)
|
start_date_copy = add_days(start_date_copy, add_by)
|
||||||
if len(schedule_list) < no_of_visit:
|
if len(schedule_list) < no_of_visit:
|
||||||
|
|||||||
Reference in New Issue
Block a user