mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
added time log batch
This commit is contained in:
@@ -21,7 +21,10 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
|
||||
if(!doc.timesheet_date) set_multiple(cdt,cdn,{timesheet_date:get_today()});
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc,cdt,cdn){}
|
||||
cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
||||
cur_frm.set_intro("Timesheets will soon be removed. Please create a new Time Log. To create \
|
||||
a new Time Log, to to Projects > Time Log > New Time Log. This will be removed in a few days.")
|
||||
}
|
||||
|
||||
|
||||
cur_frm.fields_dict['timesheet_details'].grid.get_field("project_name").get_query = function(doc,cdt,cdn){
|
||||
|
||||
@@ -51,6 +51,8 @@ class DocType:
|
||||
return time.strptime(timestr, format)
|
||||
|
||||
def validate(self):
|
||||
msgprint("Please create a new Time Log", raise_exception=True)
|
||||
|
||||
if getdate(self.doc.timesheet_date) > getdate(nowdate()):
|
||||
msgprint("You can not prepare timesheet for future date")
|
||||
raise Exception
|
||||
|
||||
Reference in New Issue
Block a user